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

fix: handle empty newlines before diagrams in md #455

Commits on Dec 24, 2022

  1. fix: handle empty newlines before diagrams in md

    Handles empty newlines before and after diagrams in Markdown.
    
    For example, the following Markdown:
    
    ````markdown
    My text.
    
    ```mermaid
      my diagram
    ```
    ````
    
    Should get converted to:
    
    ```markdown
    My text.
    
    ![diagram](./my-diagram)
    ```
    
    However, currently, the empty newline is removed.
    We can fix this by making sure that our Regex ignores newlines outside
    of the Mermaid diagram code.
    
    Fixes: 9d7b4b2
    Fixes: mermaid-js#413
    aloisklink committed Dec 24, 2022
    Configuration menu
    Copy the full SHA
    4f58d6c View commit details
    Browse the repository at this point in the history