Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
slevithan committed Dec 20, 2024
1 parent 0f60fb5 commit 06c9d85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -948,11 +948,11 @@ The following don't yet have any support, and throw errors. They're all infreque
- Flags `P` (POSIX is ASCII) and `y{g}`/`y{w}` (grapheme boundary modes).
- Rarely-used character specifiers: Non-A-Za-z with `\cx`, `\C-x`; meta `\M-x`, `\M-\C-x`; bracketed octals `\o{…}`; octal UTF-8 encoded bytes (≥ `\200`).
- Code point sequences: `\x{H H …}`, `\o{O O …}`.
- Whole-pattern modifiers: Don't capture `(?C)`, ignore-case is ASCII `(?I)`.
- Whole-pattern modifier: Don't capture `(?C)`.
- Supportable for some uses:
- Absence functions: `(?~…)`, etc.
- Conditionals: `(?(…)…)`, etc.
- Whole-pattern modifier: Find longest `(?L)`.
- Whole-pattern modifiers: Ignore-case is ASCII `(?I)`, find longest `(?L)`.
- Not supportable:
- Callout functions: `(?{…})`, etc.

Expand Down
6 changes: 6 additions & 0 deletions scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ async function onigurumaExec(pattern, str, pos = 0) {
if (!match) {
return null;
}

// for (const obj of match.captureIndices) {
// obj.match = str.slice(obj.start, obj.end);
// }
// console.log(match);

const m = match.captureIndices[0];
return {
'0': str.slice(m.start, m.end),
Expand Down

0 comments on commit 06c9d85

Please sign in to comment.