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

Preserve plain-text in AST to avoid blinding extensions to it #628

Merged

Conversation

aidantwoods
Copy link
Collaborator

@aidantwoods aidantwoods commented May 8, 2018

Revert the preg_replace straight to rawHtml introduced in #614 so that extensions can have access to the AST if they overload inlineText. e.g. ParsedownExtra will use the AST to insert abbreviations: https://travis-ci.org/erusev/parsedown-extra/jobs/376557504#L196-L201

A preg_replace on something that is already HTML risks catching text inside attributes/tag names, so AST access is necessary for modifying the text reliably.

@aidantwoods aidantwoods added this to the 1.8.0 milestone May 8, 2018
@aidantwoods aidantwoods merged commit c83af0a into erusev:master May 8, 2018
@aidantwoods aidantwoods deleted the fix/revert-rawHtml-breaks-insertion branch May 8, 2018 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant