Skip to content

Commit b3d9b96

Browse files
authored
fix: emojis in titles not working correctly and update (#1016)
the doc(add a note)
1 parent 0e4cdad commit b3d9b96

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

docs/helpers.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
docsify extends Markdown syntax to make your documents more readable.
44

5+
> Note: For the special code syntax cases, you'd better put them within a code backticks to avoid any conflicting from configurations or emojis.
6+
57
## important content
68

79
Important content like:

src/core/render/compiler.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ export function getAndRemoveConfig(str = '') {
2121
str = str
2222
.replace(/^'/, '')
2323
.replace(/'$/, '')
24-
.replace(/(?:^|\s):([\w-]+)=?([\w-]+)?/g, (m, key, value) => {
25-
config[key] = (value && value.replace(/"/g, '')) || true
26-
return ''
24+
.replace(/(?:^|\s):([\w-]+:?)=?([\w-]+)?/g, (m, key, value) => {
25+
if(key.indexOf(':') === -1){
26+
config[key] = (value && value.replace(/"/g, '')) || true
27+
return ''
28+
}
29+
return m
2730
})
2831
.trim()
2932
}

0 commit comments

Comments
 (0)