var md = require('markdown-it')();
var cjk = require('markdown-it-cjk-breaks')
var text = '![img](image.png)\ntext';
var conv = md.use(cjk).render(text)
console.log(conv);
throws an exception
TypeError: character.charCodeAt is not a function
This is because the plugin tries to runeastAsianWidth(last) in line55 even if last is not modified from 0x20. Here it the token-array when the exception was thrown.
This script
throws an exception
This is because the plugin tries to run
eastAsianWidth(last)
in line55 even iflast
is not modified from 0x20. Here it the token-array when the exception was thrown.