(html)
| 39 | * payloads like Expressive Code's `data-code="…"` copy-button cache, which |
| 40 | * mirrors the code sample and would otherwise read as a false positive. */ |
| 41 | function toProse(html) { |
| 42 | return html |
| 43 | .replace(/<pre[\s\S]*?<\/pre>/gi, " ") |
| 44 | .replace(/<code[\s\S]*?<\/code>/gi, " ") |
| 45 | .replace(/<[^>]+>/g, " "); |
| 46 | } |
| 47 | |
| 48 | /* A GFM table delimiter row: a pipe adjacent to a run of 2+ dashes. Real |
| 49 | * prose effectively never contains this; a rendered table never does either |
no outgoing calls
no test coverage detected