Icons for admonishments get parsed into first HTML element
See original GitHub issuehttps://github.com/iterative/dvc.org/pull/3371 introduced admonishments. While very nice, I ran into a few oddities while using them. Right now I am incorporating them through raw HTML rather than MD.
<admon type="warn">
In this example we are using a <code>t2.micro</code> AWS EC2 instance. At the time of writing this is included in the AWS free tier. Make sure that you qualify for this free usage to prevent unexpected spending. When you specify a bulkier <code>cloud-type</code>, your expenses will rise.
</admon>
Because backticks don’t get parsed within the HTML element (or e.g. [link](ref)
) I simply used <code></code>
this has the side effect of prepending a warning emoji to the first code element:
I circumvented this by explicitly using a <p>
element, but I’m not sure what the intended behavior here is.
<admon type="warn">
<p>
In this example we are using a <code>t2.micro</code> AWS EC2 instance. At the time of writing this is included in the AWS free tier. Make sure that you qualify for this free usage to prevent unexpected spending. When you specify a bulkier <code>cloud-type</code>, your expenses will rise.
</p>
</admon>
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Admonitions | Asciidoctor Docs
These are called admonitions. This page introduces you to admonition types AsciiDoc provides, how to add admonitions to your document, and how to...
Read more >$v:admonition-icons - DocBook xslTNG
These are the icons that will be presented next to admonitions. They're single Unicode characters in the default distribution, but they can be...
Read more >Which semantic HTML tag for displaying side notes and ...
I believe the accepted answer is not quite correct. According to the HTML5 working draft, the <aside> element can be used to mark...
Read more >Syntax Extensions - MyST-Parser
Math is parsed by adding to the myst_enable_extensions list option, in the sphinx conf.py ... to inhibit this override and process all HTML...
Read more >reStructuredText Directives - Docutils - SourceForge
The "code" directive constructs a literal block. If the code language is specified, the content is parsed by the Pygments syntax highlighter and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Correct! Empty lines are a must when using our custom HTML components. Since I don’t think there is anything we can do about it on our end, going to go ahead and close this issue!
It’s an unfortunate downside of using
gatsby-transformer-remark
in our engine, as it’s not quite built for custom components like something like MDX is, the parser is very finicky about how components are written.