diff --git a/README.md b/README.md index b45afbd3..0e1938cb 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ - Simple and lightweight (~13kB gzipped) - Multiple themes - Not build static html files +- Support emoji :laughing: ## Quick start Create a `index.html` and using `hash router`. diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 48477265..32859b5b 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -5,8 +5,9 @@ > A magical documentation site generator. - Simple and lightweight (~13kB gzipped) -- Multiple themes - Not build static html files +- Support emoji :laughing: +- Multiple themes [GitHub](https://github.com/QingWei-Li/docsify/) diff --git a/src/render.js b/src/render.js index fc0ceb47..51dcc09d 100644 --- a/src/render.js +++ b/src/render.js @@ -63,6 +63,10 @@ export function init (options) { return `

${text}

` } + renderer.text = function (text) { + return text.replace(/:(\S*?):/ig, '$1') + } + if (typeof OPTIONS.markdown === 'function') { markdown.setOptions({ renderer }) markdown = OPTIONS.markdown.call(this, markdown) diff --git a/src/themes/basic/_layout.css b/src/themes/basic/_layout.css index cde49f67..5acaf5e9 100644 --- a/src/themes/basic/_layout.css +++ b/src/themes/basic/_layout.css @@ -7,6 +7,11 @@ -webkit-font-smoothing: antialiased; } +.emoji { + height: 1.2em; + vertical-align: middle; +} + .progress { background-color: $color-primary; height: 2px;