Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Blocks parser #6

Open
nliautaud opened this issue Oct 27, 2017 · 0 comments
Open

Blocks parser #6

nliautaud opened this issue Oct 27, 2017 · 0 comments

Comments

@nliautaud
Copy link
Owner

nliautaud commented Oct 27, 2017

For now the editable blocks are parsed trough regex. That's ugly and not flexible, but it works.

The two main issues are the need of a "ending mark" comment <!--end editable-->, and the rigidity of supported attributes.

To use a proper HTML parser, we'd need to find how to replace a specific zone (or node content) without altering any outer content, even if it's not proper html. It would be the parser job to return the full content with localized changes, but the tried parsers, when given non-html content (ex. markdown) were altering unknown parts.

An alternative would be to keep regex but get rid of html blocks, and use custom tags or twig functions, but it would add a layer between the user and ContentTools that may be worse.

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

No branches or pull requests

1 participant