Skip to content
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

Remove Plugins #261

Closed
RobertDober opened this issue Jul 29, 2019 · 4 comments
Closed

Remove Plugins #261

RobertDober opened this issue Jul 29, 2019 · 4 comments
Assignees
Milestone

Comments

@RobertDober
Copy link
Collaborator

Followup of #236 to be removed in 1.4

@RobertDober RobertDober added this to the 1.4 milestone Jul 29, 2019
@RobertDober RobertDober self-assigned this Jul 29, 2019
@redrabbit
Copy link

I'd like to customise/extend Earmark to support different things. For example, auto-link specific characters (@ mention) or support emojis.

if anyone wants them, they could be implemented around Earmark instead of in Earmark.

What would be the best way to customise the output outside of Earmark?

Let's say to support emojis, i'd like to implement a simple syntax alà :+1:. Now this still needs to be escaped when in <code> or <pre> blocks.

@RobertDober
Copy link
Collaborator Author

I am working on exposing the AST right now, I hope to release an experimental AST exposure in 1.3.6.

A plugin was not really suited for your use case anyway, as you would have needed to preprocess the input and then recursively call as_html but as you pointed out correctly the preprocessor needed intimite knowledge of the document structure.

That is where AST exposure shines, traverse the AST tree, e.g. with my Traverse lib, 😊 setting a flag when inside code and depending on your flag replacing the 👍 ...

I hope that the AST exposure will create some libs using Earmark

@chazsconi
Copy link

@RobertDober great that you now have the AST exposed, but after manipulating the AST is there a way to then render it as HTML?

@RobertDober
Copy link
Collaborator Author

RobertDober commented Sep 7, 2019

@chazsconi not yet
I guess I have to open a FR
#277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants