Commit Graph
18 Commits
Author SHA1 Message Date
Oliver Hamlet 1443ae91c6 Update docs 2026-01-21 20:13:30 +00:00
Oliver Hamlet 8a7190bfd3 Don't say modifiers aren't supported
They're supported by regress as of v0.10.5.
2026-01-21 17:55:56 +00:00
Oliver Hamlet faa48eb2e6 Update some outdated info in metadata doc 2025-10-11 10:22:35 +01:00
Oliver Hamlet f14e47e0e8 Switch to the regress crate for regex
It uses about 56 MB less memory when LOOT launches into my Skyrim SE
large test load order with the latest masterlist and prelude, and
explicitly targets ECMAScript-like syntax like C++ std::regex does,
though supports newer functionality.

Compared to fancy-regex's syntax support, regress adds support for the
\0 nul character escape and removes support for:

- modifiers (e.g. `(?i)`)
- some Unicode character classes (e.g. used with `\p{}` and `\P{}`)
- the ASCII/POSIX character classes (e.g. `[:alpha:]`)
- various character escapes, including \A \a \z \b{start} \<
  \b{end} \> \b{start-half} \b{end-half}
- (?P<name>exp) named capture groups

However, since regress's v flag requires more characters to be escaped
inside character classes than fancy-regex's Unicode support requires,
it's not used, so that further restricts the supported Unicode character
classes, and means that character class intersection, union and
subtraction syntaxes aren't supported.

The nul character escape is irrelevant for filename matching as it's not
allowed in Windows or Linux filenames.

Compared to C++ std::regex, the new restrictions are:

- the lack of support for ASCII/POSIX character classes
- the lack of support for control character escapes (e.g. `\cX`)

The lack of support for control character escapes is irrelevant as
control characters aren't allowed in Windows filenames.

A search of the masterlists doesn't find any use of the ASCII character
classes, and it's very unlikely that any user metadata would use them.
If such syntax is in use, it'll cause an error.
2025-07-29 18:25:40 +01:00
Oliver Hamlet efd2d43ae3 Update plugin name regex doc
fancy-regex supports more syntax than C++ std::regex, but for the syntax
that they both accept:

- std::regex matches . against a single character, fancy-regex matches
  it against a Unicode codepoint
- \w \W \d \D \s \S \b and \B are locale-dependent in std::regex but
  Unicode-aware and locale-independent in fancy-regex
- case-insensitive comparisons are locale-dependent in std::regex but
  are Unicode-aware and locale-independent in fancy-regex
- std::regex supports \0 and \cX escapes, where X is in [A-Za-z] but
  fancy-regex does not. This is not significant for libloot's usage as
  nul and control characters are not allowed in Windows filenames.
- std::regex treats \< and \> as < and > respectively, but fancy-regex
  treats them as start- and end-of-word boundary assertions
  respectively. This is not significant for libloot's usage as they are
  not allowed in Windows filenames.
- std::regex allows a literal [ to appear within a character class, but
  fancy-regex requires it to be escaped.

These differences are unlikely to cause any issues.
2025-07-29 17:56:31 +01:00
sibir-ineandOliver Hamlet 453334ae5f Add text to after section
- Clarify that regexes can't be used for afters, reqs, or incs.
  - As discussed with @MacSplody on Discord.
2021-03-26 10:04:23 +00:00
sibir-ineandOliver Hamlet b4fb4f079a Add text to req section
- Clarify behavior of conditions with req entries.
  - As discussed with @MacSplody on Discord.
2021-03-26 10:04:23 +00:00
SibirandGitHub 1ba07141e4 Fix typos & make adjustments to docs (#72)
* Adjustment
  - HTML entity doesn't render.

* Typos
  - Add a few missing spaces.
2021-03-11 16:10:22 -08:00
Oliver Hamlet d9788b70fc Remove enabled field from PluginMetadata
It doesn't actually do anything, and fixing that turns out to be
very complicated. Since nobody appears to have noticed, just remove
the field entirely.
2020-07-11 19:13:13 +01:00
Oliver Hamlet 3baa0e88e5 Set version number and changelog for v0.15.2 2020-06-14 10:47:07 +01:00
Oliver Hamlet e9519b0e91 Fix inaccurate doc 2020-03-30 19:38:26 +01:00
Oliver Hamlet b15d33bf91 Update metadata syntax docs 2018-10-27 17:00:22 +01:00
Oliver Hamlet 2f776cfac6 Allow clean and dirty metadata in regex plugin entries 2018-10-20 12:47:53 +01:00
Oliver Hamlet 523dc87f04 Remove plugin priorities 2018-03-28 19:08:26 +01:00
Oliver Hamlet f8fbe2984f Fix group cyclic interactions
Skip adding an edge between a pair of plugins if all the following
conditions are met:
- the edge is to be added due to group membership
- adding the edge would introduce a cycle in the absence of any
  other group membership edges.
2018-03-19 17:27:56 +00:00
Oliver Hamlet fdb4e46542 Document the group metadata syntax 2018-03-17 18:26:36 +00:00
Frederik “Freso” S. Olesen 335008543a Fix one too many backticks: "``udr" → "udr`" 2017-07-14 20:24:44 +02:00
Oliver Hamlet 4948dd0a7c Rewrite metadata syntax documentation
Rewrite it as reStructuredText so that it can be hosted alongside the
API documentation on Read The Docs, which allows linking to WIP syntax
documentation.
2016-09-18 13:04:23 +01:00