mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-10-19 05:40:16 -04:00
slight doc comment touch-up/simplification [minor]
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
This commit is contained in:
parent
145285abf6
commit
20adab2f32
1 changed files with 3 additions and 3 deletions
|
@ -164,11 +164,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 = S(text).trim().stripTags().s
|
let newText = S(text).trim().stripTags().s
|
||||||
// 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…
Reference in a new issue