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

Change Markdown parser #33

Closed
mnapoli opened this issue Nov 19, 2014 · 7 comments
Closed

Change Markdown parser #33

mnapoli opened this issue Nov 19, 2014 · 7 comments
Assignees

Comments

@mnapoli
Copy link
Contributor

mnapoli commented Nov 19, 2014

Problems with the current parser:

  • doesn't support fenced code blocks (à la GitHub):
    • indented code blocks are a pain to write with some editors
    • syntax highlighting is random because autodetected, which leads to very weird highlighting (fenced code blocks allow to set a language explicitly)
  • hacked all over the place

Parsedown is probably the best choice. The main difficulty now is try to understand what all those hacks do and see if they can be ported to Parsedown.

@mnapoli mnapoli self-assigned this Nov 19, 2014
@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 19, 2014

Here is the list of all the features added onto dflydev/markdown:

  • automatic IDs on titles

  • import a file, e.g.

    <pre><code markdown="1">[include url="https://raw.github.com/piwik/piwik/master/misc/others/api_rest_call.php" escape="true"]</code></pre>
    

    (with and without escaping)

  • languages on codeblocks using [language]:

        [ini]
    
        [MySection]
        my_config_value = 1
    

We need to port the 2 first one, the last can be replaced by fenced code blocks.

@mattab
Copy link
Member

mattab commented Nov 19, 2014

👍

FYI in Marketplace Thomas changed markdown parser recently: https://github.com/piwik/piwik-marketplace/commit/46c5f164013de5a119130838057371d37636edf7 - maybe the same could be reused to KISS?

@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 20, 2014

ok I didn't see that. I've used Parsedown and I'm going to stick with it for now because:

@mattab
Copy link
Member

mattab commented Nov 23, 2014

see #34 (comment)

@mattab mattab reopened this Nov 23, 2014
@mattab
Copy link
Member

mattab commented Nov 25, 2014

I notice in the View page linked from MVC page that there is some markdown issue:
http://developer.piwik.org//api-reference/Piwik/View <- markdown is not all processed eg

`$contentType` (`string`) —

@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 25, 2014

Noted, working on it

@mnapoli
Copy link
Contributor Author

mnapoli commented Nov 25, 2014

Fixed

@mnapoli mnapoli closed this as completed Nov 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants