Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /** findMdpInsert and findCode functions use a similar layout to return the location and contents |
||
20 | export function findMdpCode (txt, start) { |
||
21 | // finds the next location of mdpInsert in a code span within txt |
||
22 | let posn = start |
||
23 | let x |
||
24 | while (true) { |
||
25 | x = findCode(txt, posn) |
||
26 | if (x.start === -1 || x.commandString.indexOf('mdpInsert ') !== -1) { |
||
27 | return x |
||
28 | } else { |
||
29 | posn = x.start + x.length |
||
30 | } |
||
31 | } |
||
|
|||
32 | } |
||
33 |