Giter VIP home page Giter VIP logo

Comments (10)

puzrin avatar puzrin commented on May 18, 2024

Could you use permalink from demo to show exacty input and output, and put correct output to gist ?

from markdown-it.

puzrin avatar puzrin commented on May 18, 2024

Also, please, reduce example to minimal possible.

from markdown-it.

afc163 avatar afc163 commented on May 18, 2024

Ok, I will do it later.

from markdown-it.

afc163 avatar afc163 commented on May 18, 2024

Good: https://markdown-it.github.io/#md64=eyJzb3VyY2UiOiI8dGFibGU+XG5cbiAgPHRyPlxuICAgIDx0ZD4xMjM8L3RkPlxuICAgIDx0ZD4xMjM8L3RkPlxuICA8L3RyPlxuPC90YWJsZT4iLCJkZWZhdWx0cyI6eyJodG1sIjp0cnVlLCJ4aHRtbE91dCI6ZmFsc2UsImJyZWFrcyI6ZmFsc2UsImxhbmdQcmVmaXgiOiJsYW5ndWFnZS0iLCJsaW5raWZ5Ijp0cnVlLCJ0eXBvZ3JhcGhlciI6dHJ1ZSwiX2hpZ2hsaWdodCI6dHJ1ZSwiX3N0cmljdCI6ZmFsc2UsIl92aWV3IjoiaHRtbCJ9fQ==

Bad: https://markdown-it.github.io/#md64=eyJzb3VyY2UiOiI8dGFibGU+XG5cbiAgICA8dHI+XG4gICAgPHRkPjEyMzwvdGQ+XG4gICAgPHRkPjEyMzwvdGQ+XG4gIDwvdHI+XG48L3RhYmxlPiIsImRlZmF1bHRzIjp7Imh0bWwiOnRydWUsInhodG1sT3V0IjpmYWxzZSwiYnJlYWtzIjpmYWxzZSwibGFuZ1ByZWZpeCI6Imxhbmd1YWdlLSIsImxpbmtpZnkiOnRydWUsInR5cG9ncmFwaGVyIjp0cnVlLCJfaGlnaGxpZ2h0Ijp0cnVlLCJfc3RyaWN0IjpmYWxzZSwiX3ZpZXciOiJodG1sIn19

Bad: https://markdown-it.github.io/#md64=eyJzb3VyY2UiOiI8dGFibGU+XG5cbiAgICA8dHI+XG4gICAgICA8dGQ+MTIzPC90ZD5cbiAgICAgIDx0ZD4xMjM8L3RkPlxuICAgIDwvdHI+XG48L3RhYmxlPiIsImRlZmF1bHRzIjp7Imh0bWwiOnRydWUsInhodG1sT3V0IjpmYWxzZSwiYnJlYWtzIjpmYWxzZSwibGFuZ1ByZWZpeCI6Imxhbmd1YWdlLSIsImxpbmtpZnkiOnRydWUsInR5cG9ncmFwaGVyIjp0cnVlLCJfaGlnaGxpZ2h0Ijp0cnVlLCJfc3RyaWN0IjpmYWxzZSwiX3ZpZXciOiJodG1sIn19

from markdown-it.

puzrin avatar puzrin commented on May 18, 2024

See http://spec.commonmark.org/0.15/#html-blocks

and http://spec.commonmark.org/dingus.html?text=%3Ctable%3E%0A%0A%20%20%20%20%3Ctr%3E%0A%20%20%20%20%3Ctd%3E123%3C%2Ftd%3E%0A%20%20%20%20%3Ctd%3E123%3C%2Ftd%3E%0A%20%20%3C%2Ftr%3E%0A%3C%2Ftable%3E

We follow commonmark spec, and result is exactly as required by spec.

from markdown-it.

puzrin avatar puzrin commented on May 18, 2024

I see 2 possible solutions:

  1. Write your own rule to replace existing html_block
  2. Just fix your markup to be CommonMark-compatible (avoid empty lines in html blocks)

I understand, that result can be not as you expect, but this it NOT a bug.

from markdown-it.

afc163 avatar afc163 commented on May 18, 2024

Understood.

Github do too much in Makedown's compatibility, that is sad.

from markdown-it.

puzrin avatar puzrin commented on May 18, 2024

Closing? Or need advices how to rewrite html_block rule ?

from markdown-it.

afc163 avatar afc163 commented on May 18, 2024

That would be another issue.

from markdown-it.

puzrin avatar puzrin commented on May 18, 2024

FYI http://talk.commonmark.org/t/raw-html-blocks-proposals-comments-wanted/983?u=vitaly HTML blocks are now discussed. Not sure about this case, but general improvments are expected soon.

from markdown-it.

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.