Comments (16)
Thanks, I'll take a look in the next few days
from markdown-to-jsx.
from markdown-to-jsx.
Just for reference, I posted some use cases here:
This is an example using 6.4.1 - https://stackblitz.com/edit/react-qugqd6
This is an example using 6.6.1 - https://stackblitz.com/edit/react-6nelfr
from markdown-to-jsx.
Just a sidenote: entering "#a" crashes the compiler.
I'm not seeing that behavior btw - if you pop it into the demo site it works as expected.
from markdown-to-jsx.
I'm not seeing that behavior btw - if you pop it into the demo site it works as expected.
Did you include the quotation marks and the span? On my machine it crashes the demo site.
from markdown-to-jsx.
Yup, it didn't crash for me.
from markdown-to-jsx.
It's possible you might be viewing a cached, older version of the site?
from markdown-to-jsx.
It is for sure the most recent version offered by the server. But since it doesn't crash my local installation, it can only be an issue of outdated files.
from markdown-to-jsx.
Interestingly if I run https://runkit.com/stephtr/runkit-npm-markdown-to-jsx it runs indefinitely. I will try to debug it if I have some time left.
(markdownToJsx.compiler('"<span>#</span>"');
also gets stuck on my local node installation."
from markdown-to-jsx.
A fix is pushed in v6.6.1, let me know how it goes!
from markdown-to-jsx.
6.6.1 fixes the crash, however the nested HTML tags still don't render correctly. Additionally, as far as I know, markdown inside HTML inside markdown is only allowed with inline elements, so when given <div>#a</div>
, markdown-to-jsx should output just <div>#a</div>
.
from markdown-to-jsx.
from markdown-to-jsx.
Actually there are:
Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style *emphasis * inside an HTML block.
[…]
Unlike block-level HTML tags, Markdown syntax is processed within span-level tags.
Otherwise it wouldn't be possible to start with an hashtag within an element without escaping it. (For example, I would like to display the hex color code within a colored div.)
from markdown-to-jsx.
Usually when mention such issues I try to help with a PR, but unfortunately at the moment I'm too busy with my other projects.
One approach would be to first convert the whole Markdown code to HTML using an existing parser (which, in contrast to simple-markdown, is able to handle HTML), which would obviate correctly implementing all rules.
from markdown-to-jsx.
from markdown-to-jsx.
Ah, I just saw #159. However before keeping the actual state (messed up parsing of HTML) I would revert #156.
from markdown-to-jsx.
Related Issues (20)
- Cannot render tag if formatted in a certain way. HOT 3
- Supply original string for special case processing HOT 2
- <blockquote> rendering is broken in Firefox after v7.4.0 HOT 2
- Version 7.4.1 has a strange consol.log in index.cjs and index.umd.js - console.log("AHHHHHHHH") HOT 4
- Slow Regex HTML_BLOCK_ELEMENT_R because of issue with self closing tags HOT 5
- Mutli-line bold/italic text not rendering correctly HOT 1
- Support multiline footnotes
- Firefox unable to render link tags HOT 1
- markdown-to-json refuses to work on some aspects HOT 9
- Can't disable HTML sanitization HOT 2
- Component is rendering too frequently, when dependencies have not changed HOT 1
- [Critical] Page freezes with this raw text HOT 4
- Reopen #568
- follow up on #520 HOT 1
- 在引用块第一位使用 kbd标签后面链接无法正常解析
- Unexpected nested list behavior
- Ordered list is not generated if there's no newline at the end
- Double line breaks (\n\n) are not converted properly
- Error using divider with `---`
- Empty `<style></style>` or `<style />` causes library to crash
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-to-jsx.