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

added "data-sort-value" to ignored HTML attributes #47

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

j-zero
Copy link

@j-zero j-zero commented Mar 31, 2020

See #46

@bovender
Copy link
Owner

Cool, thanks. Looking at it now, I wonder if it should/could be made more generic for all kinds of data- attributes...

@@ -139,7 +139,7 @@ private function buildSplitter() {
'<div.*?>|<\/div>|' . // attributes of div elements
'<span.*?>|<\/span>|' . // attributes of span elements
'<file>[^<]*<\/file>|' . // stuff inside file elements
'style=".+?"|class=".+?"|' . // styles and classes (e.g. of wikitables)
'style=".+?"|class=".+?"|data-sort-value=".+?"|' . // styles and classes (e.g. of wikitables)
Copy link
Owner

@bovender bovender Mar 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More generic variant could be:

Suggested change
'style=".+?"|class=".+?"|data-sort-value=".+?"|' . // styles and classes (e.g. of wikitables)
'style=".+?"|class=".+?"|data-[^=]+=".+?"|' . // styles and classes (e.g. of wikitables)

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I don't have much time to test it, but what about something like this:
<[^>]*>
It would match all HTML Tags with or wihtout attributes.
Is there any case in which you have to replace anything inside a HTML tag?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

push

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.

2 participants