Comments (5)
Currently I am working something with <Marked instance={customMarkedInstance} />
and planning to support extensions as well but it can be only done after markedjs/marked#2805, because the current @types/marked is messed up and doesn't exactly reflect marked library giving several errors with typescript.
Boy its not easy. I'll try but even if I support extensions, It might help your case, but it might not be possible to provide 100% support for extensions, as the renderer part in marked returns html and not react elements so it might be omitted
from marked-react.
What are you trying to parse here besides the usual?
from marked-react.
I have keyword that indicates following block should be wrapped into my component. And I need to handle this keyword in parser to properly set token type.
from marked-react.
Hi, Currently the parser accepts only tokens that are parsed by marked. See
Lines 39 to 41 in 6fbd187
I'am open to suggestions to solve this, if marked allows to extend and parse into custom tokens, we could allow here as well. Why not.
from marked-react.
I wondered for a while what you might be able to do here. Reading the marked documentation, you can see - we need to define a custom object as shown in the example. Maybe you can expose the lexar
variable to the client in order to return a custom token. I am not completely sure how we go about doing that. Perhaps you can test it :)
from marked-react.
Related Issues (12)
- `value` and `renderer` aren't marked as optional props in TypeScript definitions. HOT 2
- Missing src directory HOT 1
- No Support for Nested List
- Where do we sanitise the incoming markup? (Hooks implementation) HOT 19
- Replace html anchors with React Router Link component HOT 1
- A way to pass data to the renderer HOT 2
- Custom Extensions HOT 3
- Punctuation Invalid RegExp: Invalid Escape
- Property 'elementId' does not exist HOT 4
- Highlighting text with <mark> is not working HOT 3
- Parse inline? HOT 5
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 marked-react.