Ciconia / A New Markdown Parser for #PHP

class WhiteSpaceExtension implements ExtensionInterface

Original source code from GitHub Flavored Markdown

Copyright 2013 GitHub Inc. https://help.github.com/articles/github-flavored-markdown

Methods

void register(Markdown $markdown)

Adds listeners to EventEmitter

processHardBreak(Text $text)

Newlines

getName()

Returns the name of the extension

Details

at line 23 public void register(Markdown $markdown)

Adds listeners to EventEmitter

Parameters

Markdown $markdown

Return Value

void

at line 38 public processHardBreak(Text $text)

Newlines

The biggest difference that GFM introduces is in the handling of line breaks. With SM you can hard wrap paragraphs of text and they will be combined into a single paragraph. We find this to be the cause of a huge number of unintentional formatting errors. GFM treats newlines in paragraph-like content as real line breaks, which is probably what you intended.

Parameters

Text $text

at line 52 public getName()

Returns the name of the extension