winstromming/sassdown

Main partial title not always applied to navigation dropdown

paul66 opened this issue · 1 comments

The first comment block in the Sass partial is used to denote the <h1> for the style guide page.

If a blank line is added after the opening comment block like so...

/*

My Module
=========
*/

...then the <h1> title is used in the dropdown navigation rather than the Sass partial name i.e. My Module appears in the navigation rather than _my-module.

However if that extra blank line is not added after the opening comment block e.g.

/*
My Module
=========
*/

then the Sass partial name is not replaced by this title and remains as the Sass partial name.

I think zero, one or many blank lines should be permissible in the opening comment block before the title.

Fixed in 3be06c8.

Have amended the pattern matching to parse headings post-Markdown. Following cases have been tested and found to output properly both in-page and in-navigation:

"Setext" style syntax

/*

My Module
=========

*/
/*
My Module
=========
*/
/* My Module
========= */

"atx" style syntax

/*

# My Module

*/
/*
# My Module
*/
/* # My Module */