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

Use custom parser for markdown processing. #198

Merged
merged 3 commits into from
Oct 30, 2019
Merged

Commits on Oct 29, 2019

  1. Use custom parser for markdown processing.

    Previously, mdoc used the flexmark library for processing markdown
    files. Since flexmark is a proper markdown parser, it may not always
    understand the format of the document that mdoc was processing, for
    example:
    
    * revealjs slides inside HTML files
    * custom markdown extensions that are not supported by commonmark
    
    This commit introduces a new custom parser that only understands the
    parts of markdown files that mdoc touches: code fences. Since mdoc
    doesn't need to understand all markdown flavors to process code fences,
    we can get away with a much simpler parser than flexmark (that
    understands all of markdown).
    
    With this change, it should be possible to use mdoc on any document as
    long as the code fences start at the beginning of a line with the
    triple-backtick "scala mdoc" syntax
    ````
    ```scala mdoc
    println(42)
    ```
    ````
    
    Everything outside the code fences is left unchanged,
    character-by-character, so the underlying markup language is
    preserved.
    olafurpg committed Oct 29, 2019
    Configuration menu
    Copy the full SHA
    40265d3 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2019

  1. Fix failing test cases.

    Olafur Pall Geirsson committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    6071d2b View commit details
    Browse the repository at this point in the history
  2. Fix test failures on 2.12/2.11

    Olafur Pall Geirsson committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    ec09ef4 View commit details
    Browse the repository at this point in the history