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

Refactor footnote parsing to use DOM parsing rather than RegEx #121

Open
Rumperuu opened this issue Apr 18, 2021 · 2 comments
Open

Refactor footnote parsing to use DOM parsing rather than RegEx #121

Rumperuu opened this issue Apr 18, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Rumperuu
Copy link
Collaborator

This is going all the way back to what originally brought me into the project: the use of RegEx to parse posts for footnotes is prone to errors, and in order to respond to each of these the RegEx in task.php has grown into a bit of a beast.

A better, more reliable solution, as I mentioned at the time, would be to properly parse the DOM instead.

@Rumperuu Rumperuu added the enhancement New feature or request label Apr 18, 2021
@Rumperuu Rumperuu added this to the 2.8 milestone Apr 18, 2021
@Rumperuu Rumperuu self-assigned this Apr 18, 2021
@Rumperuu Rumperuu changed the title Refactor footnote extraction to use DOM parsing rather than RegEx Refactor footnote parsing to use DOM parsing rather than RegEx Apr 18, 2021
@markcheret
Copy link
Owner

markcheret commented Apr 18, 2021

There's also an idea to discuss regarding saving footnotes in DB:
https://wordpress.org/support/topic/possible-to-reuse-footnotes/ (see original poster and last comment)
Or have footnotes also survive in the DOM if the plugin is deleted... just an idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants