(source: string, kind: 'EDITMODE' | 'TWEAK-SCHEMA')
| 51 | } |
| 52 | |
| 53 | function findMarkerBlock(source: string, kind: 'EDITMODE' | 'TWEAK-SCHEMA'): MarkerBlock | null { |
| 54 | const begin = findMarker(source, `${kind}-BEGIN`); |
| 55 | if (begin === null) return null; |
| 56 | const end = findMarker(source, `${kind}-END`, begin.end); |
| 57 | if (end === null) return null; |
| 58 | return { |
| 59 | start: begin.start, |
| 60 | end: end.end, |
| 61 | innerStart: begin.end, |
| 62 | innerEnd: end.start, |
| 63 | inner: source.slice(begin.end, end.start), |
| 64 | }; |
| 65 | } |
| 66 | |
| 67 | function replaceMarkerBlock( |
| 68 | source: string, |
no test coverage detected