markdown-it / markdown-it-emoji

Emoji syntax plugin for markdown-it markdown parser
https://markdown-it.github.io/
MIT License
719 stars 167 forks source link

If empty `defs` object is provided to options then newlines are converted to empty emojis #46

Closed tommoor closed 2 years ago

tommoor commented 2 years ago

Seems to be related to this line: https://github.com/markdown-it/markdown-it-emoji/blob/master/lib/normalize_opts.js#L47

rlidwka commented 2 years ago

Please provide an example code that shows the problem.

I couldn't reproduce this:

var md = require('markdown-it')()
var emoji = require('markdown-it-emoji')

md.use(emoji, { defs: {} })

console.log(md.render("foo\nbar\n\nbaz"))

// Outputs:
// <p>foo
// bar</p>
// <p>baz</p>