New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

markdown-it-cjk-breaks

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-cjk-breaks - npm Package Compare versions

Comparing version

to
2.0.0

dist/index.cjs.js

461

dist/markdown-it-cjk-breaks.js

@@ -1,395 +0,90 @@

/*! markdown-it-cjk-breaks 1.1.3 https://github.com//markdown-it/markdown-it-cjk-breaks @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownitCjkBreaks = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
var eaw = {};
if ('undefined' == typeof module) {
window.eastasianwidth = eaw;
} else {
module.exports = eaw;
}
eaw.eastAsianWidth = function(character) {
var x = character.charCodeAt(0);
var y = (character.length == 2) ? character.charCodeAt(1) : 0;
var codePoint = x;
if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) {
x &= 0x3FF;
y &= 0x3FF;
codePoint = (x << 10) | y;
codePoint += 0x10000;
/*! markdown-it-cjk-breaks 2.0.0 https://github.com/markdown-it/markdown-it-cjk-breaks.git @license MIT */
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
global.markdownitCjkBreaks = factory());
})(this, (function() {
"use strict";
// Generated code.
function isAmbiguous(x) {
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
}
if ((0x3000 == codePoint) ||
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
(0xFFE0 <= codePoint && codePoint <= 0xFFE6)) {
return 'F';
function isFullWidth(x) {
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
}
if ((0x20A9 == codePoint) ||
(0xFF61 <= codePoint && codePoint <= 0xFFBE) ||
(0xFFC2 <= codePoint && codePoint <= 0xFFC7) ||
(0xFFCA <= codePoint && codePoint <= 0xFFCF) ||
(0xFFD2 <= codePoint && codePoint <= 0xFFD7) ||
(0xFFDA <= codePoint && codePoint <= 0xFFDC) ||
(0xFFE8 <= codePoint && codePoint <= 0xFFEE)) {
return 'H';
function isWide(x) {
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
}
if ((0x1100 <= codePoint && codePoint <= 0x115F) ||
(0x11A3 <= codePoint && codePoint <= 0x11A7) ||
(0x11FA <= codePoint && codePoint <= 0x11FF) ||
(0x2329 <= codePoint && codePoint <= 0x232A) ||
(0x2E80 <= codePoint && codePoint <= 0x2E99) ||
(0x2E9B <= codePoint && codePoint <= 0x2EF3) ||
(0x2F00 <= codePoint && codePoint <= 0x2FD5) ||
(0x2FF0 <= codePoint && codePoint <= 0x2FFB) ||
(0x3001 <= codePoint && codePoint <= 0x303E) ||
(0x3041 <= codePoint && codePoint <= 0x3096) ||
(0x3099 <= codePoint && codePoint <= 0x30FF) ||
(0x3105 <= codePoint && codePoint <= 0x312D) ||
(0x3131 <= codePoint && codePoint <= 0x318E) ||
(0x3190 <= codePoint && codePoint <= 0x31BA) ||
(0x31C0 <= codePoint && codePoint <= 0x31E3) ||
(0x31F0 <= codePoint && codePoint <= 0x321E) ||
(0x3220 <= codePoint && codePoint <= 0x3247) ||
(0x3250 <= codePoint && codePoint <= 0x32FE) ||
(0x3300 <= codePoint && codePoint <= 0x4DBF) ||
(0x4E00 <= codePoint && codePoint <= 0xA48C) ||
(0xA490 <= codePoint && codePoint <= 0xA4C6) ||
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
(0xD7B0 <= codePoint && codePoint <= 0xD7C6) ||
(0xD7CB <= codePoint && codePoint <= 0xD7FB) ||
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
(0xFE30 <= codePoint && codePoint <= 0xFE52) ||
(0xFE54 <= codePoint && codePoint <= 0xFE66) ||
(0xFE68 <= codePoint && codePoint <= 0xFE6B) ||
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
(0x1F200 <= codePoint && codePoint <= 0x1F202) ||
(0x1F210 <= codePoint && codePoint <= 0x1F23A) ||
(0x1F240 <= codePoint && codePoint <= 0x1F248) ||
(0x1F250 <= codePoint && codePoint <= 0x1F251) ||
(0x20000 <= codePoint && codePoint <= 0x2F73F) ||
(0x2B740 <= codePoint && codePoint <= 0x2FFFD) ||
(0x30000 <= codePoint && codePoint <= 0x3FFFD)) {
return 'W';
function getCategory(x) {
if (isAmbiguous(x)) return "ambiguous";
if (isFullWidth(x)) return "fullwidth";
if (x === 8361 || x >= 65377 && x <= 65470 || x >= 65474 && x <= 65479 || x >= 65482 && x <= 65487 || x >= 65490 && x <= 65495 || x >= 65498 && x <= 65500 || x >= 65512 && x <= 65518) {
return "halfwidth";
}
if (x >= 32 && x <= 126 || x === 162 || x === 163 || x === 165 || x === 166 || x === 172 || x === 175 || x >= 10214 && x <= 10221 || x === 10629 || x === 10630) {
return "narrow";
}
if (isWide(x)) return "wide";
return "neutral";
}
if ((0x0020 <= codePoint && codePoint <= 0x007E) ||
(0x00A2 <= codePoint && codePoint <= 0x00A3) ||
(0x00A5 <= codePoint && codePoint <= 0x00A6) ||
(0x00AC == codePoint) ||
(0x00AF == codePoint) ||
(0x27E6 <= codePoint && codePoint <= 0x27ED) ||
(0x2985 <= codePoint && codePoint <= 0x2986)) {
return 'Na';
function validate(codePoint) {
if (!Number.isSafeInteger(codePoint)) {
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
}
}
if ((0x00A1 == codePoint) ||
(0x00A4 == codePoint) ||
(0x00A7 <= codePoint && codePoint <= 0x00A8) ||
(0x00AA == codePoint) ||
(0x00AD <= codePoint && codePoint <= 0x00AE) ||
(0x00B0 <= codePoint && codePoint <= 0x00B4) ||
(0x00B6 <= codePoint && codePoint <= 0x00BA) ||
(0x00BC <= codePoint && codePoint <= 0x00BF) ||
(0x00C6 == codePoint) ||
(0x00D0 == codePoint) ||
(0x00D7 <= codePoint && codePoint <= 0x00D8) ||
(0x00DE <= codePoint && codePoint <= 0x00E1) ||
(0x00E6 == codePoint) ||
(0x00E8 <= codePoint && codePoint <= 0x00EA) ||
(0x00EC <= codePoint && codePoint <= 0x00ED) ||
(0x00F0 == codePoint) ||
(0x00F2 <= codePoint && codePoint <= 0x00F3) ||
(0x00F7 <= codePoint && codePoint <= 0x00FA) ||
(0x00FC == codePoint) ||
(0x00FE == codePoint) ||
(0x0101 == codePoint) ||
(0x0111 == codePoint) ||
(0x0113 == codePoint) ||
(0x011B == codePoint) ||
(0x0126 <= codePoint && codePoint <= 0x0127) ||
(0x012B == codePoint) ||
(0x0131 <= codePoint && codePoint <= 0x0133) ||
(0x0138 == codePoint) ||
(0x013F <= codePoint && codePoint <= 0x0142) ||
(0x0144 == codePoint) ||
(0x0148 <= codePoint && codePoint <= 0x014B) ||
(0x014D == codePoint) ||
(0x0152 <= codePoint && codePoint <= 0x0153) ||
(0x0166 <= codePoint && codePoint <= 0x0167) ||
(0x016B == codePoint) ||
(0x01CE == codePoint) ||
(0x01D0 == codePoint) ||
(0x01D2 == codePoint) ||
(0x01D4 == codePoint) ||
(0x01D6 == codePoint) ||
(0x01D8 == codePoint) ||
(0x01DA == codePoint) ||
(0x01DC == codePoint) ||
(0x0251 == codePoint) ||
(0x0261 == codePoint) ||
(0x02C4 == codePoint) ||
(0x02C7 == codePoint) ||
(0x02C9 <= codePoint && codePoint <= 0x02CB) ||
(0x02CD == codePoint) ||
(0x02D0 == codePoint) ||
(0x02D8 <= codePoint && codePoint <= 0x02DB) ||
(0x02DD == codePoint) ||
(0x02DF == codePoint) ||
(0x0300 <= codePoint && codePoint <= 0x036F) ||
(0x0391 <= codePoint && codePoint <= 0x03A1) ||
(0x03A3 <= codePoint && codePoint <= 0x03A9) ||
(0x03B1 <= codePoint && codePoint <= 0x03C1) ||
(0x03C3 <= codePoint && codePoint <= 0x03C9) ||
(0x0401 == codePoint) ||
(0x0410 <= codePoint && codePoint <= 0x044F) ||
(0x0451 == codePoint) ||
(0x2010 == codePoint) ||
(0x2013 <= codePoint && codePoint <= 0x2016) ||
(0x2018 <= codePoint && codePoint <= 0x2019) ||
(0x201C <= codePoint && codePoint <= 0x201D) ||
(0x2020 <= codePoint && codePoint <= 0x2022) ||
(0x2024 <= codePoint && codePoint <= 0x2027) ||
(0x2030 == codePoint) ||
(0x2032 <= codePoint && codePoint <= 0x2033) ||
(0x2035 == codePoint) ||
(0x203B == codePoint) ||
(0x203E == codePoint) ||
(0x2074 == codePoint) ||
(0x207F == codePoint) ||
(0x2081 <= codePoint && codePoint <= 0x2084) ||
(0x20AC == codePoint) ||
(0x2103 == codePoint) ||
(0x2105 == codePoint) ||
(0x2109 == codePoint) ||
(0x2113 == codePoint) ||
(0x2116 == codePoint) ||
(0x2121 <= codePoint && codePoint <= 0x2122) ||
(0x2126 == codePoint) ||
(0x212B == codePoint) ||
(0x2153 <= codePoint && codePoint <= 0x2154) ||
(0x215B <= codePoint && codePoint <= 0x215E) ||
(0x2160 <= codePoint && codePoint <= 0x216B) ||
(0x2170 <= codePoint && codePoint <= 0x2179) ||
(0x2189 == codePoint) ||
(0x2190 <= codePoint && codePoint <= 0x2199) ||
(0x21B8 <= codePoint && codePoint <= 0x21B9) ||
(0x21D2 == codePoint) ||
(0x21D4 == codePoint) ||
(0x21E7 == codePoint) ||
(0x2200 == codePoint) ||
(0x2202 <= codePoint && codePoint <= 0x2203) ||
(0x2207 <= codePoint && codePoint <= 0x2208) ||
(0x220B == codePoint) ||
(0x220F == codePoint) ||
(0x2211 == codePoint) ||
(0x2215 == codePoint) ||
(0x221A == codePoint) ||
(0x221D <= codePoint && codePoint <= 0x2220) ||
(0x2223 == codePoint) ||
(0x2225 == codePoint) ||
(0x2227 <= codePoint && codePoint <= 0x222C) ||
(0x222E == codePoint) ||
(0x2234 <= codePoint && codePoint <= 0x2237) ||
(0x223C <= codePoint && codePoint <= 0x223D) ||
(0x2248 == codePoint) ||
(0x224C == codePoint) ||
(0x2252 == codePoint) ||
(0x2260 <= codePoint && codePoint <= 0x2261) ||
(0x2264 <= codePoint && codePoint <= 0x2267) ||
(0x226A <= codePoint && codePoint <= 0x226B) ||
(0x226E <= codePoint && codePoint <= 0x226F) ||
(0x2282 <= codePoint && codePoint <= 0x2283) ||
(0x2286 <= codePoint && codePoint <= 0x2287) ||
(0x2295 == codePoint) ||
(0x2299 == codePoint) ||
(0x22A5 == codePoint) ||
(0x22BF == codePoint) ||
(0x2312 == codePoint) ||
(0x2460 <= codePoint && codePoint <= 0x24E9) ||
(0x24EB <= codePoint && codePoint <= 0x254B) ||
(0x2550 <= codePoint && codePoint <= 0x2573) ||
(0x2580 <= codePoint && codePoint <= 0x258F) ||
(0x2592 <= codePoint && codePoint <= 0x2595) ||
(0x25A0 <= codePoint && codePoint <= 0x25A1) ||
(0x25A3 <= codePoint && codePoint <= 0x25A9) ||
(0x25B2 <= codePoint && codePoint <= 0x25B3) ||
(0x25B6 <= codePoint && codePoint <= 0x25B7) ||
(0x25BC <= codePoint && codePoint <= 0x25BD) ||
(0x25C0 <= codePoint && codePoint <= 0x25C1) ||
(0x25C6 <= codePoint && codePoint <= 0x25C8) ||
(0x25CB == codePoint) ||
(0x25CE <= codePoint && codePoint <= 0x25D1) ||
(0x25E2 <= codePoint && codePoint <= 0x25E5) ||
(0x25EF == codePoint) ||
(0x2605 <= codePoint && codePoint <= 0x2606) ||
(0x2609 == codePoint) ||
(0x260E <= codePoint && codePoint <= 0x260F) ||
(0x2614 <= codePoint && codePoint <= 0x2615) ||
(0x261C == codePoint) ||
(0x261E == codePoint) ||
(0x2640 == codePoint) ||
(0x2642 == codePoint) ||
(0x2660 <= codePoint && codePoint <= 0x2661) ||
(0x2663 <= codePoint && codePoint <= 0x2665) ||
(0x2667 <= codePoint && codePoint <= 0x266A) ||
(0x266C <= codePoint && codePoint <= 0x266D) ||
(0x266F == codePoint) ||
(0x269E <= codePoint && codePoint <= 0x269F) ||
(0x26BE <= codePoint && codePoint <= 0x26BF) ||
(0x26C4 <= codePoint && codePoint <= 0x26CD) ||
(0x26CF <= codePoint && codePoint <= 0x26E1) ||
(0x26E3 == codePoint) ||
(0x26E8 <= codePoint && codePoint <= 0x26FF) ||
(0x273D == codePoint) ||
(0x2757 == codePoint) ||
(0x2776 <= codePoint && codePoint <= 0x277F) ||
(0x2B55 <= codePoint && codePoint <= 0x2B59) ||
(0x3248 <= codePoint && codePoint <= 0x324F) ||
(0xE000 <= codePoint && codePoint <= 0xF8FF) ||
(0xFE00 <= codePoint && codePoint <= 0xFE0F) ||
(0xFFFD == codePoint) ||
(0x1F100 <= codePoint && codePoint <= 0x1F10A) ||
(0x1F110 <= codePoint && codePoint <= 0x1F12D) ||
(0x1F130 <= codePoint && codePoint <= 0x1F169) ||
(0x1F170 <= codePoint && codePoint <= 0x1F19A) ||
(0xE0100 <= codePoint && codePoint <= 0xE01EF) ||
(0xF0000 <= codePoint && codePoint <= 0xFFFFD) ||
(0x100000 <= codePoint && codePoint <= 0x10FFFD)) {
return 'A';
function eastAsianWidthType(codePoint) {
validate(codePoint);
return getCategory(codePoint);
}
return 'N';
};
eaw.characterLength = function(character) {
var code = this.eastAsianWidth(character);
if (code == 'F' || code == 'W' || code == 'A') {
return 2;
} else {
return 1;
function is_surrogate(c1, c2) {
return c1 >= 55296 && c1 <= 56319 && c2 >= 56320 && c2 <= 57343;
}
};
// Split a string considering surrogate-pairs.
function stringToArray(string) {
return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
}
eaw.length = function(string) {
var characters = stringToArray(string);
var len = 0;
for (var i = 0; i < characters.length; i++) {
len = len + this.characterLength(characters[i]);
}
return len;
};
eaw.slice = function(text, start, end) {
textLen = eaw.length(text)
start = start ? start : 0;
end = end ? end : 1;
if (start < 0) {
start = textLen + start;
}
if (end < 0) {
end = textLen + end;
}
var result = '';
var eawLen = 0;
var chars = stringToArray(text);
for (var i = 0; i < chars.length; i++) {
var char = chars[i];
var charLen = eaw.length(char);
if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
if (eawLen + charLen <= end) {
result += char;
} else {
break;
}
function is_hangul(c) {
// require('unicode-10.0.0/Script/Hangul/regex')
/* eslint-disable max-len, no-misleading-character-class */
return /[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/.test(c);
/* eslint-enable max-len */ }
function process_inlines(tokens) {
for (let i = 0; i < tokens.length; i++) {
if (tokens[i].type !== "softbreak") continue;
// default last/next character to space
let last = " ";
let next = " ";
for (let j = i - 1; j >= 0; j--) {
if (tokens[j].type !== "text") continue;
const c1 = tokens[j].content.charCodeAt(tokens[j].content.length - 2);
const c2 = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
last = tokens[j].content.slice(is_surrogate(c1, c2) ? -2 : -1);
break;
}
for (let j = i + 1; j < tokens.length; j++) {
if (tokens[j].type !== "text") continue;
const c1 = tokens[j].content.charCodeAt(0);
const c2 = tokens[j].content.charCodeAt(1);
next = tokens[j].content.slice(0, is_surrogate(c1, c2) ? 2 : 1);
break;
}
let remove_break = false;
// remove newline if it's adjacent to ZWSP
if (last === "\u200b" || next === "\u200b") remove_break = true;
// remove newline if both characters are fullwidth (F), wide (W) or
// halfwidth (H), but not Hangul
if (/^[fwh]$/.test(eastAsianWidthType(last.codePointAt(0))[0]) && /^[fwh]$/.test(eastAsianWidthType(next.codePointAt(0))[0])) {
if (!is_hangul(last) && !is_hangul(next)) remove_break = true;
}
if (remove_break) {
tokens[i].type = "text";
tokens[i].content = "";
}
}
eawLen += charLen;
}
return result;
};
},{}],2:[function(require,module,exports){
'use strict';
var eastAsianWidth = require('eastasianwidth').eastAsianWidth;
function is_surrogate(c1, c2) {
return c1 >= 0xD800 && c1 <= 0xDBFF && c2 >= 0xDC00 && c2 <= 0xDFFF;
}
function is_hangul(c) {
// require('unicode-10.0.0/Script/Hangul/regex')
/* eslint-disable max-len */
return /[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/.test(c);
/* eslint-enable max-len */
}
function process_inlines(tokens) {
var i, j, last, next, c1, c2, remove_break;
for (i = 0; i < tokens.length; i++) {
if (tokens[i].type !== 'softbreak') continue;
// default last/next character to space
last = next = ' ';
for (j = i - 1; j >= 0; j--) {
if (tokens[j].type !== 'text') continue;
c1 = tokens[j].content.charCodeAt(tokens[j].content.length - 2);
c2 = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
last = tokens[j].content.slice(is_surrogate(c1, c2) ? -2 : -1);
break;
function cjk_breaks(state) {
for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
if (state.tokens[blkIdx].type !== "inline") continue;
process_inlines(state.tokens[blkIdx].children);
}
for (j = i + 1; j < tokens.length; j++) {
if (tokens[j].type !== 'text') continue;
c1 = tokens[j].content.charCodeAt(0);
c2 = tokens[j].content.charCodeAt(1);
next = tokens[j].content.slice(0, is_surrogate(c1, c2) ? 2 : 1);
break;
}
remove_break = false;
// remove newline if it's adjacent to ZWSP
if (last === '\u200b' || next === '\u200b') remove_break = true;
// remove newline if both characters are fullwidth (F), wide (W) or
// halfwidth (H), but not Hangul
if (/^[FWH]$/.test(eastAsianWidth(last)) && /^[FWH]$/.test(eastAsianWidth(next))) {
if (!is_hangul(last) && !is_hangul(next)) remove_break = true;
}
if (remove_break) {
tokens[i].type = 'text';
tokens[i].content = '';
}
}
}
function cjk_breaks(state) {
for (var blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
if (state.tokens[blkIdx].type !== 'inline') continue;
process_inlines(state.tokens[blkIdx].children, state);
function cjk_breaks_plugin(md) {
md.core.ruler.push("cjk_breaks", cjk_breaks);
}
}
module.exports = function cjk_breaks_plugin(md) {
md.core.ruler.push('cjk_breaks', cjk_breaks);
};
},{"eastasianwidth":1}]},{},[2])(2)
});
return cjk_breaks_plugin;
}));

@@ -1,1 +0,2 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).markdownitCjkBreaks=t()}}(function(){return function o(i,f,a){function c(e,t){if(!f[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(s)return s(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var u=f[e]={exports:{}};i[e][0].call(u.exports,function(t){return c(i[e][1][t]||t)},u,u.exports,o,i,f,a)}return f[e].exports}for(var s="function"==typeof require&&require,t=0;t<a.length;t++)c(a[t]);return c}({1:[function(t,e,n){var c={};function s(t){return t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}void 0===e?window.eastasianwidth=c:e.exports=c,c.eastAsianWidth=function(t){var e=t.charCodeAt(0),n=2==t.length?t.charCodeAt(1):0,r=e;return 55296<=e&&e<=56319&&56320<=n&&n<=57343&&(r=(e&=1023)<<10|(n&=1023),r+=65536),12288==r||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":8361==r||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||172==r||175==r||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":161==r||164==r||167<=r&&r<=168||170==r||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||198==r||208==r||215<=r&&r<=216||222<=r&&r<=225||230==r||232<=r&&r<=234||236<=r&&r<=237||240==r||242<=r&&r<=243||247<=r&&r<=250||252==r||254==r||257==r||273==r||275==r||283==r||294<=r&&r<=295||299==r||305<=r&&r<=307||312==r||319<=r&&r<=322||324==r||328<=r&&r<=331||333==r||338<=r&&r<=339||358<=r&&r<=359||363==r||462==r||464==r||466==r||468==r||470==r||472==r||474==r||476==r||593==r||609==r||708==r||711==r||713<=r&&r<=715||717==r||720==r||728<=r&&r<=731||733==r||735==r||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||1025==r||1040<=r&&r<=1103||1105==r||8208==r||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||8240==r||8242<=r&&r<=8243||8245==r||8251==r||8254==r||8308==r||8319==r||8321<=r&&r<=8324||8364==r||8451==r||8453==r||8457==r||8467==r||8470==r||8481<=r&&r<=8482||8486==r||8491==r||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||8585==r||8592<=r&&r<=8601||8632<=r&&r<=8633||8658==r||8660==r||8679==r||8704==r||8706<=r&&r<=8707||8711<=r&&r<=8712||8715==r||8719==r||8721==r||8725==r||8730==r||8733<=r&&r<=8736||8739==r||8741==r||8743<=r&&r<=8748||8750==r||8756<=r&&r<=8759||8764<=r&&r<=8765||8776==r||8780==r||8786==r||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||8853==r||8857==r||8869==r||8895==r||8978==r||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||9675==r||9678<=r&&r<=9681||9698<=r&&r<=9701||9711==r||9733<=r&&r<=9734||9737==r||9742<=r&&r<=9743||9748<=r&&r<=9749||9756==r||9758==r||9792==r||9794==r||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||9839==r||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||9955==r||9960<=r&&r<=9983||10045==r||10071==r||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||65533==r||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"},c.characterLength=function(t){var e=this.eastAsianWidth(t);return"F"==e||"W"==e||"A"==e?2:1},c.length=function(t){for(var e=s(t),n=0,r=0;r<e.length;r++)n+=this.characterLength(e[r]);return n},c.slice=function(t,e,n){textLen=c.length(t),n=n||1,(e=e||0)<0&&(e=textLen+e),n<0&&(n=textLen+n);for(var r="",u=0,o=s(t),i=0;i<o.length;i++){var f=o[i],a=c.length(f);if(e-(2==a?1:0)<=u){if(!(u+a<=n))break;r+=f}u+=a}return r}},{}],2:[function(t,e,n){"use strict";var a=t("eastasianwidth").eastAsianWidth;function c(t,e){return 55296<=t&&t<=56319&&56320<=e&&e<=57343}function s(t){return/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/.test(t)}function r(t){var e,n,r,u,o,i,f;for(e=0;e<t.length;e++)if("softbreak"===t[e].type){for(r=u=" ",n=e-1;0<=n;n--)if("text"===t[n].type){o=t[n].content.charCodeAt(t[n].content.length-2),i=t[n].content.charCodeAt(t[n].content.length-1),r=t[n].content.slice(c(o,i)?-2:-1);break}for(n=e+1;n<t.length;n++)if("text"===t[n].type){o=t[n].content.charCodeAt(0),i=t[n].content.charCodeAt(1),u=t[n].content.slice(0,c(o,i)?2:1);break}f=!1,"\u200b"!==r&&"\u200b"!==u||(f=!0),/^[FWH]$/.test(a(r))&&/^[FWH]$/.test(a(u))&&(s(r)||s(u)||(f=!0)),f&&(t[e].type="text",t[e].content="")}}function u(t){for(var e=t.tokens.length-1;0<=e;e--)"inline"===t.tokens[e].type&&r(t.tokens[e].children)}e.exports=function(t){t.core.ruler.push("cjk_breaks",u)}},{eastasianwidth:1}]},{},[2])(2)});
/*! markdown-it-cjk-breaks 2.0.0 https://github.com/markdown-it/markdown-it-cjk-breaks.git @license MIT */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).markdownitCjkBreaks=e()}(this,(function(){"use strict";function t(t){return function(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}(t),function(t){return 161===t||164===t||167===t||168===t||170===t||173===t||174===t||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||198===t||208===t||215===t||216===t||t>=222&&t<=225||230===t||t>=232&&t<=234||236===t||237===t||240===t||242===t||243===t||t>=247&&t<=250||252===t||254===t||257===t||273===t||275===t||283===t||294===t||295===t||299===t||t>=305&&t<=307||312===t||t>=319&&t<=322||324===t||t>=328&&t<=331||333===t||338===t||339===t||358===t||359===t||363===t||462===t||464===t||466===t||468===t||470===t||472===t||474===t||476===t||593===t||609===t||708===t||711===t||t>=713&&t<=715||717===t||720===t||t>=728&&t<=731||733===t||735===t||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||1025===t||t>=1040&&t<=1103||1105===t||8208===t||t>=8211&&t<=8214||8216===t||8217===t||8220===t||8221===t||t>=8224&&t<=8226||t>=8228&&t<=8231||8240===t||8242===t||8243===t||8245===t||8251===t||8254===t||8308===t||8319===t||t>=8321&&t<=8324||8364===t||8451===t||8453===t||8457===t||8467===t||8470===t||8481===t||8482===t||8486===t||8491===t||8531===t||8532===t||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||8585===t||t>=8592&&t<=8601||8632===t||8633===t||8658===t||8660===t||8679===t||8704===t||8706===t||8707===t||8711===t||8712===t||8715===t||8719===t||8721===t||8725===t||8730===t||t>=8733&&t<=8736||8739===t||8741===t||t>=8743&&t<=8748||8750===t||t>=8756&&t<=8759||8764===t||8765===t||8776===t||8780===t||8786===t||8800===t||8801===t||t>=8804&&t<=8807||8810===t||8811===t||8814===t||8815===t||8834===t||8835===t||8838===t||8839===t||8853===t||8857===t||8869===t||8895===t||8978===t||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||9632===t||9633===t||t>=9635&&t<=9641||9650===t||9651===t||9654===t||9655===t||9660===t||9661===t||9664===t||9665===t||t>=9670&&t<=9672||9675===t||t>=9678&&t<=9681||t>=9698&&t<=9701||9711===t||9733===t||9734===t||9737===t||9742===t||9743===t||9756===t||9758===t||9792===t||9794===t||9824===t||9825===t||t>=9827&&t<=9829||t>=9831&&t<=9834||9836===t||9837===t||9839===t||9886===t||9887===t||9919===t||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||9955===t||9960===t||9961===t||t>=9963&&t<=9969||9972===t||t>=9974&&t<=9977||9979===t||9980===t||9982===t||9983===t||10045===t||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||65533===t||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||127375===t||127376===t||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}(e=t)?"ambiguous":function(t){return 12288===t||t>=65281&&t<=65376||t>=65504&&t<=65510}(e)?"fullwidth":8361===e||e>=65377&&e<=65470||e>=65474&&e<=65479||e>=65482&&e<=65487||e>=65490&&e<=65495||e>=65498&&e<=65500||e>=65512&&e<=65518?"halfwidth":e>=32&&e<=126||162===e||163===e||165===e||166===e||172===e||175===e||e>=10214&&e<=10221||10629===e||10630===e?"narrow":function(t){return t>=4352&&t<=4447||8986===t||8987===t||9001===t||9002===t||t>=9193&&t<=9196||9200===t||9203===t||9725===t||9726===t||9748===t||9749===t||t>=9800&&t<=9811||9855===t||9875===t||9889===t||9898===t||9899===t||9917===t||9918===t||9924===t||9925===t||9934===t||9940===t||9962===t||9970===t||9971===t||9973===t||9978===t||9981===t||9989===t||9994===t||9995===t||10024===t||10060===t||10062===t||t>=10067&&t<=10069||10071===t||t>=10133&&t<=10135||10160===t||10175===t||11035===t||11036===t||11088===t||11093===t||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||94192===t||94193===t||t>=94208&&t<=100343||t>=100352&&t<=101589||t>=101632&&t<=101640||t>=110576&&t<=110579||t>=110581&&t<=110587||110589===t||110590===t||t>=110592&&t<=110882||110898===t||t>=110928&&t<=110930||110933===t||t>=110948&&t<=110951||t>=110960&&t<=111355||126980===t||127183===t||127374===t||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||127568===t||127569===t||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||127988===t||t>=127992&&t<=128062||128064===t||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||128378===t||128405===t||128406===t||128420===t||t>=128507&&t<=128591||t>=128640&&t<=128709||128716===t||t>=128720&&t<=128722||t>=128725&&t<=128727||t>=128732&&t<=128735||128747===t||128748===t||t>=128756&&t<=128764||t>=128992&&t<=129003||129008===t||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129672||t>=129680&&t<=129725||t>=129727&&t<=129733||t>=129742&&t<=129755||t>=129760&&t<=129768||t>=129776&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}(e)?"wide":"neutral";var e}function e(t,e){return t>=55296&&t<=56319&&e>=56320&&e<=57343}function n(t){return/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/.test(t)}function o(o){for(let u=0;u<o.length;u++){if("softbreak"!==o[u].type)continue;let r=" ",i=" ";for(let t=u-1;t>=0;t--){if("text"!==o[t].type)continue;const n=o[t].content.charCodeAt(o[t].content.length-2),u=o[t].content.charCodeAt(o[t].content.length-1);r=o[t].content.slice(e(n,u)?-2:-1);break}for(let t=u+1;t<o.length;t++){if("text"!==o[t].type)continue;const n=o[t].content.charCodeAt(0),u=o[t].content.charCodeAt(1);i=o[t].content.slice(0,e(n,u)?2:1);break}let c=!1;"\u200b"!==r&&"\u200b"!==i||(c=!0),/^[fwh]$/.test(t(r.codePointAt(0))[0])&&/^[fwh]$/.test(t(i.codePointAt(0))[0])&&(n(r)||n(i)||(c=!0)),c&&(o[u].type="text",o[u].content="")}}function u(t){for(let e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&o(t.tokens[e].children)}return function(t){t.core.ruler.push("cjk_breaks",u)}}));
{
"name": "markdown-it-cjk-breaks",
"version": "1.1.3",
"version": "2.0.0",
"description": "Suppress linebreaks between east asian characters",

@@ -11,7 +11,16 @@ "keywords": [

"license": "MIT",
"scripts": {
"test": "make test"
"main": "dist/index.cjs.js",
"module": "index.mjs",
"exports": {
".": {
"require": "./dist/index.cjs.js",
"import": "./index.mjs"
},
"./*": {
"require": "./*",
"import": "./*"
}
},
"files": [
"index.js",
"index.mjs",
"lib/",

@@ -21,15 +30,22 @@ "dist/"

"dependencies": {
"eastasianwidth": "~0.2.0"
"get-east-asian-width": "^1.2.0"
},
"scripts": {
"lint": "eslint .",
"build": "rollup -c",
"test": "npm run lint && npm run build && c8 --exclude dist --exclude test -r text -r html -r lcov mocha",
"prepublishOnly": "npm run lint && npm run build"
},
"devDependencies": {
"browserify": "^16.2.3",
"coveralls": "^3.0.2",
"eslint": "^5.9.0",
"istanbul": "^0.4.5",
"lodash": "^4.16.2",
"markdown-it": "^8.0.0",
"markdown-it-testgen": "~0.1.0",
"mocha": "^5.2.0",
"uglify-js": "^3.4.9"
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"c8": "^8.0.1",
"eslint": "^8.55.0",
"eslint-config-standard": "^17.1.0",
"markdown-it": "^13.0.2",
"markdown-it-testgen": "^0.1.6",
"mocha": "^10.2.0",
"rollup": "^4.6.1"
}
}