got to a nice point, right now I can do bi-directional transformations, and also have my spelling and grammar error markers that are also cleaned up so they don't end up in the source text

This commit is contained in:
Chris Kruining 2025-02-14 16:19:48 +11:00
parent 8e0eee5847
commit f4d59b30f5
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
20 changed files with 414 additions and 279 deletions

View file

@ -12,7 +12,7 @@ export const splitAt = (subject: string, index: number): readonly [string, strin
export function* gen__split_by_filter(subject: string, filter: string): Generator<readonly [boolean, string], void, unknown> {
let lastIndex = 0;
for (const { 0: match, index, ...rest } of subject.matchAll(new RegExp(filter, 'gmi'))) {
for (const { 0: match, index } of subject.matchAll(new RegExp(filter, 'gmi'))) {
const end = index + match.length;
yield [false, subject.slice(lastIndex, index)];