mirror of
https://github.com/status-im/codimd.git
synced 2025-01-11 23:14:24 +00:00
slight doc comment touch-up/simplification [minor]
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
This commit is contained in:
parent
56cc64e910
commit
9e4d07926a
@ -168,11 +168,11 @@ export function renderTags (view) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function slugifyWithUTF8 (text) {
|
function slugifyWithUTF8 (text) {
|
||||||
// remove html tags and trim spaces
|
// remove HTML tags and trim spaces
|
||||||
let newText = stripTags(text.toString().trim())
|
let newText = stripTags(text.toString().trim())
|
||||||
// replace all spaces in between to dashes
|
// replace space between words with dashes
|
||||||
newText = newText.replace(/\s+/g, '-')
|
newText = newText.replace(/\s+/g, '-')
|
||||||
// slugify string to make it valid for attribute
|
// slugify string to make it valid as an attribute
|
||||||
newText = newText.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, '')
|
newText = newText.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, '')
|
||||||
return newText
|
return newText
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user