1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

MarkdownでEmojiが使える

This commit is contained in:
Rokt33r
2015-11-23 11:04:43 +09:00
parent cc2a2f6dfb
commit 53455496bf
4 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import markdownit from 'markdown-it'
import hljs from 'highlight.js'
import emoji from 'markdown-it-emoji'
var md = markdownit({
typographer: true,
@@ -18,6 +19,7 @@ var md = markdownit({
return ''; // use external default escaping
}
})
md.use(emoji)
export default function markdown (content) {
if (content == null) content = ''

View File

@@ -43,6 +43,7 @@
"highlight.js": "^8.9.1",
"lodash": "^3.10.1",
"markdown-it": "^4.3.1",
"markdown-it-emoji": "^1.1.0",
"md5": "^2.0.0",
"moment": "^2.10.3",
"socket.io-client": "^1.3.6",

View File

@@ -69,7 +69,8 @@ var config = {
'lodash',
'markdown-it',
'moment',
'highlight.js'
'highlight.js',
'markdown-it-emoji'
]
}

View File

@@ -45,7 +45,8 @@ module.exports = {
'lodash',
'markdown-it',
'moment',
'highlight.js'
'highlight.js',
'markdown-it-emoji'
],
resolve: {
extensions: ['', '.js', '.jsx', 'styl']