Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #33: Replaced the Markdown parser #34

Merged
merged 9 commits into from
Nov 23, 2014
Merged

Fixes #33: Replaced the Markdown parser #34

merged 9 commits into from
Nov 23, 2014

Conversation

mnapoli
Copy link
Contributor

@mnapoli mnapoli commented Nov 20, 2014

Implements #33

  • replaced the Markdown parser to Parsedown Extra
  • support for CommonMark (i.e. main thing is fenced code blocks like on GitHub)
  • replaced [include url="<url>" escape="true/false"] with {@include <url>} and {@include escape <url>} for simplicity and consistency with the custom tags that we can use in PHP comments, and also I think that it has less chances of conflicts with Markdown syntax (the old syntax reused link syntax which could be confusing)
  • refactored the Markdown parsing and custom additions (using an interface and the decorator pattern)
  • added explicit language for some codeblocks (especially the remote-included ones) for more reliable syntax highlighting: possible thanks to fenced code blocks
  • replaced some inline HTML <pre><code></code></pre> with fenced code blocks (I think it was previously necessary because impossible to set an indentation on remote-included files)

@mattab
Copy link
Member

mattab commented Nov 23, 2014

More consistency and features, looks nice! Feel free to merge it when it suits

mattab pushed a commit that referenced this pull request Nov 23, 2014
Fixes #33: Replaced the Markdown parser
@mattab mattab merged commit 5e2a250 into master Nov 23, 2014
@mnapoli mnapoli deleted the markdown-parser branch November 23, 2014 23:36
@mattab
Copy link
Member

mattab commented Nov 23, 2014

Noticed some regressions @mnapoli

  • on metadata the following _URL = index.php?module=API&method=ImageGraph.get&idSite=7&apiModule=UserSettings&... but it should be italic instead.
  • on segmentation there is
    &segment=country==IN Return results where the country is India
    but the backtick should have transformed to code ?

@mattab mattab mentioned this pull request Nov 23, 2014
@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 24, 2014

@mattab fixed it, those guides were using really weird syntaxes and HTML elements that don't even exist anymore in HTML5 ;)

@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 24, 2014

btw we can now use tables instead of HTML in Markdown files: d817a52 (much easier to read)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants