Comments (3)
Okay the inner template string indentation is the culprit.
I guess this should be stated/corrected in the Readme?
from react-remarkable.
But what's the fix here?
In my case, a tabbed/spaced block doesn't work at all, it needs to be completely left alligned. Not even the contents can have spaces.
<Markdown>{
`
## This works
`
}</Markdown>
but this doesn't:
<Markdown>{
`
## Doesn't work
`
}</Markdown>
nor does this:
<Markdown>{
`
## Doesn't work
`
}</Markdown>
from react-remarkable.
@risabhkumar-cc One way I got around this (really depending on use-cases etc.)
import stripIndent from 'strip-indent';
import Markdown from 'react-remarkable';
<Markdown>{stripIndent(children)}</Markdown>
from react-remarkable.
Related Issues (20)
- Uncaught TypeError: Cannot set property 'Autolinker' of undefined HOT 4
- Render custom markdown HOT 2
- Mix React components and Markdown when using source attribute HOT 3
- Open Links in New window HOT 2
- react-markdown-it does has error when compiled with webpack HOT 2
- Do you have to install and configure https://highlightjs.org/ HOT 1
- Project status HOT 6
- Readme is wrong HOT 1
- parsed content surrounded by span instead of div HOT 1
- Example with JS syntax highlight HOT 4
- Inline components
- Children components HOT 2
- Unsafe lifecycle methods were found within a strict-mode tree HOT 1
- Linkify: true doesn't work for React 16.4.1
- New lines aren't respected HOT 7
- Just curious, what are the benefits?
- Is there any possible danger with dangerInnerHTML? HOT 1
- Remove dangerouslySetInnerHTML HOT 1
- replace default components (i.e. <a> by <Link>) HOT 9
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 react-remarkable.