Exclude stuff betweeen input and select tags.

Addresses #58 to prevent LinkTitles from interfering with the
PageForms extension. Needs testing.
This commit is contained in:
Daniel Kraus
2022-01-12 07:15:40 +01:00
parent d6dd9eb153
commit 4e868e3669
2 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
For changes prior to version 6.0.0, please see [`NEWS.old`](news.old). For changes prior to version 6.0.0, please see [`NEWS.old`](news.old).
## Unreleased
### Fixed
- Ensure compatibilty with the PageForms extension (#58)
## [8.0.1][] - 2021-05-08 ## [8.0.1][] - 2021-05-08
### Fixed ### Fixed
@ -14,7 +20,7 @@ For changes prior to version 6.0.0, please see [`NEWS.old`](news.old).
- Fixed a regression concerning `linktitles-cli` progress display that was - Fixed a regression concerning `linktitles-cli` progress display that was
introduced in v8.0.0. introduced in v8.0.0.
- Prevent a division-by-zero error that could occur on the LinkTitles special - Prevent a division-by-zero error that could occur on the LinkTitles special
page. page (#55).
- Fixed the message that is shown when linking that was triggered from the - Fixed the message that is shown when linking that was triggered from the
special page has been completed. special page has been completed.

View File

@ -138,6 +138,8 @@ class Splitter {
'<syntaxhighlight.*?>.*?<\/syntaxhighlight>|' . // syntaxhighlight '<syntaxhighlight.*?>.*?<\/syntaxhighlight>|' . // syntaxhighlight
'<gallery>.*?<\/gallery>|' . // gallery '<gallery>.*?<\/gallery>|' . // gallery
'<div.*?>|<\/div>|' . // attributes of div elements '<div.*?>|<\/div>|' . // attributes of div elements
'<input.+<\/input>|' . // input tags and anything between them
'<select.+<\/select>|' . // select tags and anything between them
'<span.*?>|<\/span>|' . // attributes of span elements '<span.*?>|<\/span>|' . // attributes of span elements
'<file>[^<]*<\/file>|' . // stuff inside file elements '<file>[^<]*<\/file>|' . // stuff inside file elements
'style=".+?"|class=".+?"|data-sort-value=".+?"|' . // styles and classes (e.g. of wikitables) 'style=".+?"|class=".+?"|data-sort-value=".+?"|' . // styles and classes (e.g. of wikitables)