Comments (4)
PHP Markdown allows one to use markdown inside HTML blocks - simply by adding markdown=1 attribute to appropriate HTML block.
Actually, PHP Markdown Extra supports that feature -- as does the Extra Extension of Python-Markdown. Unfortunately, it is not documented as the feature doesn't work consistently due to limitations of our rudimentary html parser. Of course, patches are always welcome.
I should also note that unlike all other features of the Extra Extension, this feature is built right into the markdown core and is simply turned on with a flag by Extra. See the source for details.
from markdown.
Upon further consideration, I'm reopening this as a "feature" to implement "someday-maybe". Note that I changed the title to: Better and documented Support for markdown="1"
from markdown.
Hi,
I would like to encourage in implementing this feature. I am using Python Markdown in a documentation system which extends the capabilities of Markdown by macros. These macros construct things in Markdown and html, and embed them in html-div blocks, so that they can be styled by CSS. This works in Python Markdown 2.0 (well enough for me), but not in Python Markdown 2.2, so I am unable to upgrade.
Kalle
from markdown.
Hi,
in my source file I put div for layout control.
Operation with the tag markdown = "1"
works perfectly.
Except when another div is included inside div.
In this case python markdown put the div inside a paragraph.
Example:
<div markdown="1">
## Header
<div markdown="1">
blabla **strong** ...
</div>
</div>
Output:
<div>
<h2>Header</h2>
<p><div markdown="1">
blabla <strong>strong</strong> ...
</div></p>
</div>
As for php extra markdown, I use otherwise, the correct output is:
<div>
<h2>Header</h2>
<div>
blabla <strong>strong</strong> ...
</div></p>
</div>
with no extra <p>
and <div>
markdown attribute.
Do you know how to fix this? (sorry I'have no Python skill ...)
Or can we expect a futur version with this behavior?
Many thanks.
from markdown.
Related Issues (20)
- API docs are not being properly indexed for search HOT 18
- Strange and inconsistent parsing of lists with headers and multiple lines HOT 6
- The title from `toc_tokens` ignores the `smarty` extension HOT 3
- BlockProcessor output wrapped in p tag HOT 9
- Trying to migrate from `markdown2`, lists without blank lines not working HOT 3
- "Unterminated character set" exception when using extra extension HOT 6
- <table> improperly wrapped by <p> when inside a list HOT 1
- Add Support for Tab Customization in Code Blocks HOT 3
- List not rendering correctly when preceded by word HOT 1
- add a buildin Mermaid extention HOT 1
- No table support? HOT 8
- GFM alerts HOT 2
- TOC extension: ignore headers above [TOC] marker HOT 2
- Fenced code blocks with newlines not parsed into html <code> blocks HOT 2
- convert \u2028 to <br>? HOT 2
- `abbr` extension breaks title attribute added using `attr_list` HOT 1
- Separate extensions from core
- no anchors are created HOT 8
- A line ending that is preceded by a backslash is not parsed as a hard line break HOT 3
- Abbreviation processing order alternative HOT 4
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.