Git Product home page Git Product logo

Comments (6)

fletcher avatar fletcher commented on July 29, 2024

To avoid backtracking, I suspect the only way to handle this involves two options:

  1. Leave as is and treat comments like other HTML markup. This requires leaving out blank lines.

  2. Treat HTML comments like fenced code blocks -- once opened, you either close them, or they continue through the end of the document. (This is the approach used by CommonMark)

from multimarkdown-6.

dgreen avatar dgreen commented on July 29, 2024

from multimarkdown-6.

mn4367 avatar mn4367 commented on July 29, 2024

So at least this is partially comparable to #41?

from multimarkdown-6.

fletcher avatar fletcher commented on July 29, 2024

@mn4367 -- Yes... It's basically the same problem, complicated by the fact that CriticMarkup is, by definition, "orthogonal" to Markdown.

from multimarkdown-6.

fletcher avatar fletcher commented on July 29, 2024

The other thing to note -- comments are treated like other HTML spans in that they can either start at the beginning of a line (HTML "Block") or inside a line (HTML "Span").

An HTML Span is parsed inside of another block (e.g. a paragraph) and must therefore be completed inside the paragraph.

An HTML Block is its own block, so can contain empty lines.

from multimarkdown-6.

fletcher avatar fletcher commented on July 29, 2024

I pushed a commit to the development branch to address this. If the <!-- or --> are on lines by themselves, they can start or stop a comment block. Otherwise, they must be part of another block (e.g. a paragraph).

The test suite has some (updated) examples to clarify this, particularly HTML Comments.

I also fixed an issue with non-HTML outputs where some HTML comments would leak through but others would not. For now, HTML comments are limited to HTML only. I want to work on this further in issue #38.

from multimarkdown-6.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.