Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

bugfix for emphasis handling, experimental support for rendering to markdown

Compare
Choose a tag to compare
@fredemmott fredemmott released this 29 Mar 20:30
  • expressions such as *foo **bar *baz bim** bam* and *foo __bar *baz bim__ bam* were being parsed incorrectly (an extra * would be present outside of the tags)
  • added experimental support for producing markdown from markdown ASTs

The new Facebook\Markdown\MarkdownRenderer class can be used to produce Markdown source from Markdown ASTs. This is potentially useful when using fbmarkdown as part of a pipeline - i.e. when you take markdown as input, mutate the AST, then pass markdown output on to another tool/process.

As this is experimental, there should be no expectation of of stability for the MarkdownRenderer class - either in terms of API or output.

It is not yet used in production - however, for all the specification tests render_to_html(parse($md)) === render_to_html(parse(render_to_md(parse($md))), when the HTML is normalized via DOMDocument.