(text)
| 188 | } |
| 189 | |
| 190 | function slugifyWithUTF8 (text) { |
| 191 | // remove HTML tags and trim spaces |
| 192 | let newText = stripTags(text.toString().trim()) |
| 193 | // replace space between words with dashes |
| 194 | newText = newText.replace(/\s+/g, '-') |
| 195 | // slugify string to make it valid as an attribute |
| 196 | newText = newText.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, '') |
| 197 | return newText |
| 198 | } |
| 199 | |
| 200 | // parse meta |
| 201 | export function parseMeta (md, edit, view, toc, tocAffix) { |
no test coverage detected