Comments (7)
That's a CommonMark specification problem. It was already reported, and now in process of discussion:
http://talk.commonmark.org/t/raw-html-blocks-proposals-comments-wanted/983
I think, spec will resolve it in < 1 months, and i update parser immediately then. Is it ok?
from markdown-it.
I tried to read that but it got pretty technical, so I'm not quite understanding the proposal. It does explain why I'd seen a difference between a tag at the beginning of the line, and tags in the middle of some text.
For my purpose it's not useful to only support non-standard tags at the beginning of a line. They need to be supported anywhere (for my purpose).
At the moment I'm trying a workaround to use earlier versions of markdown-it or might have to switch back to Remarkable ...
from markdown-it.
Hm... they have the same codebase, and i don't remember that changed html tags logic. Are you sure it worked better before?
from markdown-it.
Version from master should eat dash in tag names now. But it you need those tags to be block-like (not wrapped with paragraphs), you have to extend this list https://github.com/markdown-it/markdown-it/blob/master/lib/common/html_blocks.js
var blockTags = require('markdown-it/lib/common/html_blocks');
blockTags.push('my-block-tag');
Also i recommend to read upcoming spec changes and write there your suggestions, if you see any problems. This parser strictly follow CommonMark spec.
In worst case, you can rewrite approproate parcer rules with your own.
from markdown-it.
I tried to read that but it got pretty technical, so I'm not quite understanding the proposal. It does explain why I'd seen a difference between a tag at the beginning of the line, and tags in the middle of some text.
http://spec.commonmark.org/0.15/#html-blocks
Your tag could work if it was the part of html block. For example:
<!-- -->
<hello-world></hello-world>
When parser find start of html block (<!--
) in this case, it takes as html everything until next empty line.
from markdown-it.
Released 3.0.2 with allowed dashes in tag names.
Closing?
from markdown-it.
Yes it looks good. Thank you.
from markdown-it.
Related Issues (20)
- Quadratic output size explosion with tables extension HOT 1
- Convenient way to use markdown-it via cdn? HOT 1
- “Propuesta de Integración de Funcionalidad de Comentarios en la Plataforma de Blog XYZ”
- Improve code in `state_inline.mjs` HOT 1
- Table parsing does not work HOT 3
- Is it possible to get col number and row number of each token? HOT 1
- isString is not a function HOT 1
- bold render error HOT 1
- crash when input has brackets without parentheses HOT 1
- inline html transform error HOT 3
- Bold can not be rendered with punctuation marks HOT 1
- Disabling the "code" rule doesn't disable code parsing, just code rendering
- Nested numbering not working as expected HOT 1
- How can I custom renderer tag?
- Error parsing numbered bullet in Markdown HOT 1
- Is this a markdown-it thing or a commonmark thing? HOT 3
- Certain tables under bullet points are not rendered HOT 7
- feat: add source line and col for tokens HOT 1
- Major performance issue when parsing a long list of reference links HOT 10
- Inserting a link in markdown with underscore HOT 1
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.
from markdown-it.