Comments (3)
What would be the rule? I don't think this should apply for all top level tags. E.g.
Welcome!
<b>Be nice to each other!<b>
Thanks.
should add paragraph tags around each block including the middle one. So would they only be left out for block level tags?
from smu.
Yeah, I think changing the behavior for block-level tags only would make sense. Then somehow disable markdown processing until the corresponding closing tag. Maybe keep a counter of non-commented, non-quoted open (+1) and close (-1) tags of the same tag type and it ends when the counter reaches zero? I think it's fair to assume that the HTML is valid and tags/comments/quotes are balanced. If that's too complicated, I think you could also just count the tags that start at the beginning of the line and make it a user requirement that these are not commented or quoted.
from smu.
Looks like the official rules say that block-level tags should be treated differently:
The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc.
— must be separated from surrounding content by blank lines, and the start and end tags of the
block should not be indented with tabs or spaces. Markdown is smart enough not to add extra
(unwanted) <p> tags around HTML block-level tags.
https://daringfireball.net/projects/markdown/syntax#html
Based on the description, it sounds like just counting corresponding open and close tags at the beginning of lines would be sufficient.
from smu.
Related Issues (9)
- Lists should interrupt paragraphs
- Blank lines in code blocks within list items HOT 2
- support tables HOT 1
- Does not support tables (patch included) HOT 29
- UTF-8 headings not detected (patch included) HOT 4
- no support for html entities HOT 3
- Links containing single quote don't work
- <br> works but <br><br> doesn't HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
tags
from smu.