Skip to content

RegexParser now ends values at the syntax parameter value separator - #138

Merged
thunderer merged 1 commit into
masterfrom
tk-regex-separator
Nov 20, 2026
Merged

thunderer merged 1 commit into
masterfrom
tk-regex-separator

Conversation

@thunderer

Copy link
Copy Markdown
Owner

RegexParser ended unquoted values at a hard-coded = instead of the configured parameter value separator. With : as the separator, [a k:x=y] was not parsed at all and [a k:x:y] was accepted, the opposite of RegularParser. The default syntax is not affected, because its separator is =.

  • unquoted bbCode and parameter values now end at the configured separator,
  • a test checks both cases with every parser that supports custom syntax.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

Benchmark ⚡ improved ❌ regressed ✅ untouched 🆕 new
ParserBench 0 0 20 0
ProcessorBench 0 0 8 0

A benchmark is changed when its efficiency (BASE / HEAD - 1) is at least 10% in either direction.

All benchmarks
+----------------+--------------+--------------------+------+-----+-----------------+------------------+-----------------+
| benchmark      | subject      | set                | revs | its | mem_peak        | mode             | rstdev          |
+----------------+--------------+--------------------+------+-----+-----------------+------------------+-----------------+
| ParserBench    | benchParse   | regular article    | 1    | 5   | 4.536mb +0.00%  | 119.301ms +0.57% | ±0.47% +217.40% |
| ParserBench    | benchParse   | regular dense      | 1    | 5   | 6.200mb +0.00%  | 112.959ms +0.04% | ±0.41% +54.55%  |
| ParserBench    | benchParse   | regular nested     | 1    | 5   | 7.007mb +0.00%  | 179.355ms -0.05% | ±0.36% +13.40%  |
| ParserBench    | benchParse   | regular deep       | 1    | 5   | 9.333mb +0.00%  | 113.621ms -0.11% | ±0.15% -30.03%  |
| ParserBench    | benchParse   | regular brackets   | 1    | 5   | 12.078mb +0.00% | 97.453ms +0.11%  | ±0.36% -1.86%   |
| ParserBench    | benchParse   | regex article      | 1    | 5   | 2.121mb 0.00%   | 165.543ms -0.64% | ±0.80% +236.85% |
| ParserBench    | benchParse   | regex dense        | 1    | 5   | 2.290mb +0.00%  | 114.075ms +0.15% | ±0.31% -95.73%  |
| ParserBench    | benchParse   | regex nested       | 1    | 5   | 2.121mb 0.00%   | 113.660ms -1.06% | ±0.65% -12.46%  |
| ParserBench    | benchParse   | regex deep         | 1    | 5   | 2.121mb 0.00%   | 147.448ms -0.40% | ±0.12% -89.76%  |
| ParserBench    | benchParse   | regex brackets     | 1    | 5   | 3.000mb +0.00%  | 167.214ms -1.35% | ±1.13% +31.99%  |
| ParserBench    | benchParse   | hybrid article     | 1    | 5   | 2.121mb 0.00%   | 125.918ms +0.06% | ±0.73% -6.56%   |
| ParserBench    | benchParse   | hybrid dense       | 1    | 5   | 2.179mb 0.00%   | 85.617ms -0.62%  | ±0.59% -3.19%   |
| ParserBench    | benchParse   | hybrid nested      | 1    | 5   | 2.393mb 0.00%   | 176.656ms +0.12% | ±0.26% +62.99%  |
| ParserBench    | benchParse   | hybrid deep        | 1    | 5   | 3.472mb 0.00%   | 170.581ms +0.13% | ±0.90% +1.60%   |
| ParserBench    | benchParse   | hybrid brackets    | 1    | 5   | 3.008mb 0.00%   | 165.131ms -0.13% | ±0.39% +6.78%   |
| ParserBench    | benchParse   | wordpress article  | 1    | 5   | 2.121mb 0.00%   | 89.541ms -1.06%  | ±3.37% +564.48% |
| ParserBench    | benchParse   | wordpress dense    | 1    | 5   | 2.121mb 0.00%   | 170.859ms -0.94% | ±0.34% -96.23%  |
| ParserBench    | benchParse   | wordpress nested   | 1    | 5   | 2.121mb 0.00%   | 96.418ms -0.33%  | ±1.90% +262.96% |
| ParserBench    | benchParse   | wordpress deep     | 1    | 5   | 2.121mb 0.00%   | 123.471ms -0.45% | ±0.40% -77.85%  |
| ParserBench    | benchParse   | wordpress brackets | 1    | 5   | 2.962mb +0.00%  | 93.429ms -0.03%  | ±0.23% -94.00%  |
| ProcessorBench | benchProcess | regular article    | 1    | 5   | 3.880mb +0.00%  | 106.368ms +0.25% | ±0.17% +54.98%  |
| ProcessorBench | benchProcess | regular dense      | 1    | 5   | 16.013mb +0.00% | 136.208ms +0.25% | ±0.53% -90.42%  |
| ProcessorBench | benchProcess | regular nested     | 1    | 5   | 5.817mb +0.00%  | 127.667ms -0.58% | ±0.41% +21.74%  |
| ProcessorBench | benchProcess | regular deep       | 1    | 5   | 2.512mb +0.00%  | 176.945ms -0.34% | ±0.19% -93.10%  |
| ProcessorBench | benchProcess | hybrid article     | 1    | 5   | 2.121mb 0.00%   | 129.454ms +0.74% | ±0.32% -61.16%  |
| ProcessorBench | benchProcess | hybrid dense       | 1    | 5   | 4.204mb 0.00%   | 118.093ms -1.61% | ±1.08% +40.59%  |
| ProcessorBench | benchProcess | hybrid nested      | 1    | 5   | 2.539mb 0.00%   | 167.224ms -0.23% | ±1.18% -50.42%  |
| ProcessorBench | benchProcess | hybrid deep        | 1    | 5   | 2.313mb 0.00%   | 86.455ms +0.07%  | ±0.42% +70.53%  |
+----------------+--------------+--------------------+------+-----+-----------------+------------------+-----------------+

Comparing tk-regex-separator (b68ce13) with master (5f4d792)

@thunderer
thunderer merged commit ff0720b into master Nov 20, 2026
18 checks passed
@thunderer
thunderer deleted the tk-regex-separator branch November 20, 2026 23:47
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