Comments (6)
Real-life example: Same README on different platforms
from markdown.
composer/packagist#974 has fixed the problem displaying the HTML tags <summary>
and <details>
. But the markdown within the tag is not parsed normally. I'm not sure if it is caused by this library, or how Packagist is using it.
from markdown.
As reported in composer/packagist#978, @Seldaek pointed out it is likely to be a problem in the markdown library. Quote:
I saw that but I believe it's the markdown parser at fault as the backticks remain in the output. So I figured your issue there was covering it already and decided to close on our side.
from markdown.
See http://johnmacfarlane.net/babelmark2/?normalize=1&text=%3Cdetails%3E%3Csummary%3ESome+PHP+example+(collapsed)%3C%2Fsummary%3E%0A%0A%60%60%60php%0A%3C%3Fphp%0A%0A%2F%2F+this+is+a+comment%0Aecho+%22hello+world%22%3B%0A%0A%3F%3E%0A%60%60%60%0A%0A%3C%2Fdetails%3E for a comparison of the different markdown parsers for that input.
from markdown.
But the markdown within the tag is not parsed normally. I'm not sure if it is caused by this library, or how Packagist is using it.
This is expected because markdown is not parsed inside HTML blocks.
https://daringfireball.net/projects/markdown/syntax#html
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.
As github is doing it we might add that feature to the GithubMarkdown class.
Btw, I was not aware that packagist is using this library :)
from markdown.
@cebe CommonMark (which GFM is based on now) defines that it is processed if there are empty lines between the HTML markup and the Markdown markup (which probably means it does not require balanced tags in the HTML blocks, and so the empty line makes the structure be HTML > MD > HTML
instead of just HTML
, but I haven't checked in the spec).
See http://johnmacfarlane.net/babelmark2/?normalize=1&text=%3Cdetails%3E%3Csummary%3ESome+PHP+example+(collapsed)%3C%2Fsummary%3E%0A%60%60%60php%0A%3C%3Fphp%0A%0A%2F%2F+this+is+a+comment%0Aecho+%22hello+world%22%3B%0A%0A%3F%3E%0A%60%60%60%0A%3C%2Fdetails%3E for the similar input without the empty lines. commonmark.js will not parse the codeblock anymore in that case.
from markdown.
Related Issues (20)
- Php 7 compatibility
- 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
- Maintenance status? HOT 8
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.
in Github flavored markdown
from markdown.