-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for markdown within HTML tags #4
Comments
👍 |
It is. I've been working on it. |
Yessss, fantastic. Thank you! |
+1 |
+1 Do want. |
+1 |
Great, thanks ! |
Is there any actual roadmap? This and https://michelf.ca/projects/php-markdown/extra/#spe-attr would be great.. |
+1 |
1 similar comment
+1 |
One caveat. The contents of script tags should never be parsed. |
+1 |
The latest commit (7578fe2) tries to address this. It is not a complete solution. It won't work on nested tags and, since I haven't had much time to test it or write tests for it, I can't guarantee it's stable. |
+1 |
@erusev - now that you have added this, it seems to working properly!!! Thank you so much for adding this feature to Parsedown Extra!!!!!! |
+1 for nested tags support |
+1 |
+1! When this is nested is another HTML node, it doesn't work: <div>
This is *true* markdown text.
<div markdown="1">
This is *true* markdown text.
</div>
</div> Try it on http://parsedown.org/extra/ |
I have the same need too. |
We are working on it. |
Thanks ;) |
+1 |
I believe that the latest release resolves this. |
Awesome!! Thanks so much!! I'm gonna update now! 👍 |
Ok, it does work for tags that are nested in tags that have markdown=1, but it still doesn't work for tags that are nested in tags that don't have it. I'm reopening this. |
Ok, now it should always work. |
It does not for me now when I don't specifically add This is my code: $markdown = 'Link: [parsedown](https://parsedown.org/)
<div markdown="1">
Link: [parsedown](https://parsedown.org/)
</div>
<div>
Link: [parsedown](https://parsedown.org/)
</div>
<details>
<summary><b>Click to see</b></summary>
## Title
Link: [parsedown](https://parsedown.org/)
Code: `codeblock`
</details>
';
$parser = new ParsedownExtra();
echo $parser->text($markdown); This is the HTML I get: <p>Link: <a href="https://parsedown.org/">parsedown</a></p>
<div>
<p>Link: <a href="https://parsedown.org/">parsedown</a> </p>
</div>
<div>
Link: [parsedown](https://parsedown.org/)
</div>
<details>
<summary><b>Click to see</b></summary>
## Title
Link: [parsedown](https://parsedown.org/)
Code: `codeblock`
</details> |
We've recently included Parsedown (Extra) into Statamic (and, by the way, I love it, it's so quick and does a much, much better job of handling the weird edge cases).
Anyway, someone has submitted a ticket to our support system asking about support in Parsedown (Extra) for
markdown="1"
for parsing within HTML elements. (It's part of Markdown Extra).So, I'm here doing my due diligence. Is this feature something on the Parsedown Extra roadmap for implementation? Is it perhaps already implemented but slightly different syntax from Markdown Extra?
Thanks for your time (and for such an awesome markdown parser).
Fred
The text was updated successfully, but these errors were encountered: