ansi-to-pre
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -19,6 +19,10 @@ "use strict"; | ||
const EMOJI_RE = (0, emoji_regex_1.default)(); | ||
const replaceWide = (c) => replaceNarrow(c) + ' '; | ||
const replaceNarrow = (c) => `<span style="position:absolute;line-height:1;margin-top:0.3ex">${c}</span> `; | ||
const fixEmoji = (s) => { | ||
return s.replace(EMOJI_RE, c => `<span style="position:absolute;line-height:1;margin-top:0.3ex">${c}</span> `); | ||
return s | ||
.replace(/[\u2500-\u25FF]/g, replaceNarrow) | ||
.replace(EMOJI_RE, replaceWide); | ||
}; | ||
exports.fixEmoji = fixEmoji; | ||
//# sourceMappingURL=fix-emoji.js.map |
@@ -13,5 +13,9 @@ // Handling emoji is hard. | ||
const EMOJI_RE = emojiRegex(); | ||
const replaceWide = (c) => replaceNarrow(c) + ' '; | ||
const replaceNarrow = (c) => `<span style="position:absolute;line-height:1;margin-top:0.3ex">${c}</span> `; | ||
export const fixEmoji = (s) => { | ||
return s.replace(EMOJI_RE, c => `<span style="position:absolute;line-height:1;margin-top:0.3ex">${c}</span> `); | ||
return s | ||
.replace(/[\u2500-\u25FF]/g, replaceNarrow) | ||
.replace(EMOJI_RE, replaceWide); | ||
}; | ||
//# sourceMappingURL=fix-emoji.js.map |
{ | ||
"name": "ansi-to-pre", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "convert string with ANSI color codes into a styled html pre tag", | ||
@@ -5,0 +5,0 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
292641
3048