jsdoc2md / dmd

The default output template for jsdoc2md
MIT License
39 stars 49 forks source link

NPM Header Formatting Issue #22

Closed mjhasbach closed 8 years ago

mjhasbach commented 9 years ago

This could be considered a bug in NPM's markdown parser rather than dmd, but it still may be worth adjusting for. The following markdown snippet generated by dmd:

## Modules
<dl>
<dt><a href="#module_pixiPianoRoll">pixiPianoRoll</a></dt>
<dd><p>JavaScript 2D WebGL / Canvas animated piano roll</p>
</dd>
</dl>
## Typedefs
<dl>
<dt><a href="#transportTime">transportTime</a> : <code>string</code></dt>
<dd><p>Playback position expressed in bars:quarters:sixteenths format (e.g. <code>&quot;1:2:0&quot;</code>)</p>
</dd>
<dt><a href="#note">note</a> : <code>string</code> | <code>number</code></dt>
<dd><p>Musical note expressed in <a href="https://en.wikipedia.org/wiki/Scientific_pitch_notation">Scientific notation</a>, <a href="https://en.wikipedia.org/wiki/Helmholtz_pitch_notation">Helmholtz notation</a>, <a href="https://en.wikipedia.org/wiki/Piano_key_frequencies">piano key number</a>, <a href="https://en.wikipedia.org/wiki/Audio_frequency">audio frequency</a> (the closest note will be used), or <a href="https://en.wikipedia.org/wiki/MIDI">MIDI</a> note number</p>
</dd>
<dt><a href="#noteDuration">noteDuration</a> : <code>string</code> | <code>number</code></dt>
<dd><p>Note duration expressed as a number (e.g. <code>1</code> for a whole note) or string (e.g. <code>&quot;4n&quot;</code> for a quarter note)</p>
</dd>
<dt><a href="#pianoRollAPI">pianoRollAPI</a> : <code>Object</code></dt>
<dd><p>The piano roll API</p>
</dd>
</dl>
<a name="module_pixiPianoRoll"></a>
## pixiPianoRoll
JavaScript 2D WebGL / Canvas animated piano roll

**Author:** Matthew Hasbach  
**License**: MIT  
**Copyright**: Matthew Hasbach 2015

Looks like this on NPM:

image

The problem can be fixed by simply adding a line break before each header, like so:

...
</dl>

## Typedefs
...
<a name="module_pixiPianoRoll"></a>

## pixiPianoRoll
...

Here is the file from which the markdown was generated.

75lb commented 9 years ago

can you post a link to the npm package please, so i can see it for myself?

mjhasbach commented 9 years ago

Here's two examples:

https://www.npmjs.com/package/pixi-piano-roll https://www.npmjs.com/package/google-image

75lb commented 8 years ago

fixed in the latest release, thank you for your patience!

mjhasbach commented 8 years ago

I tested this today and it worked great. Thanks!