dpeek/dart-markdown — pull request #5 by filiph (2013-12-13 13:27:05+00:00)
Title: Implement inlineOnly optional argument to markdownToHtml

I often need to markdown just one line of text. Sometimes, I know (and want) the output to be just one paragraph and nothing else. But I still want the comfort of markdown for its contents.

As another example, when providing the contents of a button (or other inline element) in markdown format, the <p></p> tags are not only not needed, but excessive and a pain to get rid of. More over, if the text of the inline element is, say, "-10 points", then markdownToHtml outputs an <ul> element instead of <p>, adding to the complexity.

My proposed change is adding a boolean option to `markdownToHtml` called `inlineOnly`. The code is then:

var html = markdownToHtml("Release the **Kraken**", inlineOnly: true);

There is no API change for standard use.