-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feature: resolving HTML - MD - HTML differences - open PR for core or make extensions? #913
Comments
Hey @TRIAEIOU . Thank you! I agree that, for most parts, makemarkdown and makehtml cycles should produce the same input->output as much as possible. If you wish to contribute, that would be awesome and really appreciated. The event system is currently being refactored/implemented (in both makemarkdown and makehtml). Have a look at https://github.com/showdownjs/showdown/tree/event_refactor I believe it makes sense to implement the event dispatch system on makemarkdown side first and then discuss how to proceed with your suggested changes. Can I contact you through email? |
Of course - I've sent a contact email to your profile email address. |
I haven't received any email @TRIAEIOU |
Ok, I've toyed around a little with event_refactor branch (https://github.com/TRIAEIOU/showdown): and experimentally inserted some event dispatchers on the makemarkdown side and creating listeners for them. Is there any documentation on the design intent around the event system such as categories of intent (.onStart vs .onCapture) event input/output types on the makemarkdown side etc.? Btw, if you still haven't received any email, could you confirm what your email address is? |
Yeah. It was in the spam folder. |
Hi @tivie Any update on this? I am using showdown to make markdown from html but i am experiencing a weird behaviour when using tag inside an tag. Code: Output:
the extra line being added after |
Hi,
First off, thanks for the excellent work on showdown!
I am using showdown to edit HTML documents in MD, in this use case it would be preferable that the result of cycling through makemarkdown and makehtml would return HTML that resembles (but understandably not identical to) the original, which is not currently the case. I have modified the core source to meet those requirements (a lot of them on the makemarkdown side). My question is how to contribute in a way that is inline with the showdown team's design intent? Would you prefer me opening suggestion PR's for the different changes or opening a PR for implementing event dispatching on the makemarkdown side and then implement the changes in extensions?
Overview of changes:
<br />
instead of<p></p>
.<p></p>
or<br>
) are not stripped and retained through the cycle (i.e.foo<br><br><br>bar
is rendered with 2 empty lines in MD and when parsed back to HTML results infoo<br><br><br>bar
<table><tbody><tr><td></td></tr></tbody></table>
round trip)., credit to Jhuix (https://github.com/jhuix) for some of the code.text not enclosed in tag prior to list/table<table or ul/ol tag>...
(current implementation lacks an\n
before the table/list in this case).All of the above could be implemented as extensions if event triggers were implemented on the makemarkdown side at subparser level (including makemarkdown/node.js to add new tags).
What is the team's thoughts?
Again, thanks for the great work!
The text was updated successfully, but these errors were encountered: