commit-intl / micro-down Goto Github PK
View Code? Open in Web Editor NEWminimalistic markdown parser
License: MIT License
minimalistic markdown parser
License: MIT License
1. A
- C
2. B
1. D
turns into:
And also the list content is not parsed recursively.
Coming from the same auto-generated nested TOC list as mentioned in #2 I found an issue with the indenting this Atom plugin is doing, it uses tabs instead of two spaces, that messes up the parser and it will instead print this:
<ul><li>undefined</li><li>undefined</li>
but maybe this is also a non issue as I'm not able to reproduce it...I switched to two spaces indenting for the nested list to see if that fixes it (after playing around in your demo), which it did, then I reverted back to tabs to create this issue, and still the parsing works fine^^...no idea what happened there, I could also reproduce it in the demo though...
The following markdown produces italics in the link text.
[https://en.wikipedia.org/wiki/Open_Financial_Exchange](https://en.wikipedia.org/wiki/Open_Financial_Exchange)
Github's rendering:
JS version : May 4 2021
added links to your example :
1. Lists can be structured and layered
1. like this
2. for example
3. [NTS Radio](https://www.nts.live/) - London
2. __and can also be mixed__
- like
+ this
- [NTS Radio](https://www.nts.live/) - London
+ [Radio Musical De Cuba](https://www.cmbfradio.cu/) - Havana
First of all, amazing work you have done here!
Second I though it would probably be better to ignore HTML comments within the markdown text, for example I have an automatic TOC generator that will wrap the generated (nested) list into HTML comments, that will end up like this after parsing:
<p><!-- TOC depthFrom:1 depthTo:4 withLinks:1 updateOnSave:1 orderedList:0 --></p>
not a big deal, but you'll get some extra spacing because of that.
Since URLs often contain unwanted side-effects and are generally wanted to be linked, they should be auto formatted like GitHub Markdown does it.
Hello,
is there a way to add target="_blank" to links in markdown?
We used Markdownit before and here attributes could be specified in the form {target="_blank"} .
Thanks for some help!
Best regards,
Timo
Line 47 in 22bae9a
In order to make PrismJS syntax highlighting work, it requires all code blocks to be formatted like so:
<pre>
<code>
// the code
</code>
</pre>
But I believe micro-down only uses <pre>
without <code>
.
My request is that snarkdown uses <pre><code>
by default OR via an option.
From the PrismJS docs:
Encourages good author practices. Other highlighters encourage or even force you to use elements that are semantically wrong, like
<pre>
(on its own) or<script>
. Prism forces you to use the correct element for marking up code:<code>
. On its own for inline code, or inside a<pre>
for blocks of code. In addition, the language is defined through the way recommended in the HTML5 draft: through alanguage-xxxx
class.
Your micro-down parser looks really great but I can't incorporate a gpl-licensed piece in my open source project. Any chance you'd reconsider and use a more permissive license?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.