Comments (7)
You would add Emoji as an inline element this means it will only be parsed with blocks that allow inline elements. Code blocks are not parsed for inline elements obviously so this should work all as expected.
Add the : marker and implement a parsing function for it and you'll have emoji support working ;)
from markdown.
Oh, cool about Emoji.
But modules can be different. Some will need recurse processing in already processed (by other modules/rules) blocks, some won’t.
from markdown.
can you give an example?
from markdown.
For example, we have typography tools like SmartPants, which replace "these"
quotes to “these”
.
In some cases we need them to process already processed blocks and inline elements: citation blocks, emphased inlines, hyperlink texts and so on.
In some cases we need them not to process: code blocks, code inlines, auto-hyperlinks (only web address provided).
This is for one module. There can be very many variations when new modules appear.
Ideally, when creating module we can have options defining whether to process which blocks, do processing before or after other processings are done and so on.
from markdown.
Looks like you are thinking of this like many other markdown parsers work using regex and processing each element type at a time over the complete text. This library works differently by checking for the next beginning element and parsing it by deciding whether to parse the contents as markdown or not.
This is what inline markers are used for. They mark beginning of an element and the associated parse function will handle everything until the end of the element.
from markdown.
Know about modern Parsedown approach.
OK, I’ll try to implement Emojis for this Markdown (as I need ’em in one of my projects) and then probably I’ll be more armed and experienced :-)
This issue is not matter of approach, regexp or parsedown, whatever. It’s more about architecture of modules: where they apply and when.
from markdown.
Imo this is solved by adding the parsePlainText() method in 0eac7ba#diff-037865b8555f7db5ac9338cfb5be7466R258
from markdown.
Related Issues (20)
- Don't use comments? HOT 9
- Php 7 compatibility
- Inline HTML support with <details> and <summary> in Github flavored markdown HOT 6
- ListTrait looping through all lines HOT 2
- Code block with empty newline does not working HOT 2
- Inconsistent behavior of multiple backticks HOT 29
- Potential XSS in link rendering HOT 2
- GFM: Line break using a backslash HOT 1
- Difference traditional and GitHub markdown HOT 3
- Can this be used to pretty print Markdown? HOT 4
- Definition list is not rendered HOT 2
- Get all headings for table of contents HOT 6
- Support for PHP source directory HOT 7
- Tags separated by spaces are rendered together HOT 1
- Table without body at the end of markdown not detected
- Confirm (modified) PSR2 coding standard HOT 3
- renderLink() breaks URLs with query params HOT 1
- h is singled out in parsing
- [FEATURE] Header links HOT 8
- Getting Fatal error Out of memory on ReflectionClass HOT 2
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.