jsdoc2md / jsdoc-to-markdown

Generate markdown documentation from jsdoc-annotated javascript
MIT License
1.69k stars 152 forks source link

--separators does not produce valid markdown #77

Closed borisovg closed 8 years ago

borisovg commented 8 years ago

Similar to #30 but this is clearly a bug.

jsdoc2md generates a single "-" where the line is supposed to be.

/**
 * Class Foo
 */
function Foo () {
}

/**
 * Class Bar
 */
function Bar () {
}

makes

$ jsdoc2md --separators --src jsdoc2md_hr.js
## Functions

<dl>
<dt><a href="#Foo">Foo()</a></dt>
<dd><p>Class Foo</p>
</dd>
<dt><a href="#Bar">Bar()</a></dt>
<dd><p>Class Bar</p>
</dd>
</dl>

<a name="Foo"></a>

## Foo()
Class Foo

**Kind**: global function  

-

<a name="Bar"></a>

## Bar()
Class Bar

**Kind**: global function  

-

I can't find a specific mention of horizontal lines in Github's markdown help pages which would mean it defers back to original markdown spec:

You can produce a horizontal rule tag (<hr />) by placing three or more hyphens, asterisks, or underscores on a line by themselves.
If you wish, you may use spaces between the hyphens or asterisks. 
75lb commented 8 years ago

Hi, Github markdown has two separators. - produces a thinner line than ***. It is not documented.

I will check this and the other issue when i get to my laptop sometime today

borisovg commented 8 years ago

In the spirit of jsdoc: if it's not documented it does not exist! ;)

75lb commented 8 years ago

closing, as most users seem satisfied with the default separator.. see this wiki page for a tutorial how to change the default separator.