Skip to content

Commit

Permalink
fix: emojis in titles not working correctly and update (#1016)
Browse files Browse the repository at this point in the history
the doc(add a note)
  • Loading branch information
Koooooo-7 authored Feb 14, 2020
1 parent 0e4cdad commit b3d9b96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

docsify extends Markdown syntax to make your documents more readable.

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

Important content like:
Expand Down
9 changes: 6 additions & 3 deletions src/core/render/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ export function getAndRemoveConfig(str = '') {
str = str
.replace(/^'/, '')
.replace(/'$/, '')
.replace(/(?:^|\s):([\w-]+)=?([\w-]+)?/g, (m, key, value) => {
config[key] = (value && value.replace(/"/g, '')) || true
return ''
.replace(/(?:^|\s):([\w-]+:?)=?([\w-]+)?/g, (m, key, value) => {
if(key.indexOf(':') === -1){
config[key] = (value && value.replace(/"/g, '')) || true
return ''
}
return m
})
.trim()
}
Expand Down

0 comments on commit b3d9b96

Please sign in to comment.