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:
parent
8e0eee5847
commit
f4d59b30f5
20 changed files with 414 additions and 279 deletions
|
@ -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)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue