GithubHelp home page GithubHelp logo

Comments (4)

waylan avatar waylan commented on June 5, 2024

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.

waylan avatar waylan commented on June 5, 2024

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.

kaba2 avatar kaba2 commented on June 5, 2024

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.

f0x2501 avatar f0x2501 commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.