@tamagui/code-to-html 1.0.1-rc.5.1 → 1.0.1-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/highlightLine.js.map +2 -2
- package/dist/cjs/highlightWord.js +4 -1
- package/dist/cjs/highlightWord.js.map +2 -2
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/highlightLine.js.map +2 -2
- package/dist/esm/highlightWord.js +4 -1
- package/dist/esm/highlightWord.js.map +2 -2
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +2 -2
- package/package.json +4 -4
- package/src/highlightLine.ts +7 -4
- package/src/highlightWord.ts +7 -2
- package/src/index.ts +5 -1
package/dist/esm/index.js
CHANGED
|
@@ -16515,7 +16515,10 @@ function highlightLine(ast, lines) {
|
|
|
16515
16515
|
var CALLOUT = /__(.*?)__/g;
|
|
16516
16516
|
function highlightWord(code) {
|
|
16517
16517
|
const html5 = toHtml(code);
|
|
16518
|
-
const result = html5.replace(
|
|
16518
|
+
const result = html5.replace(
|
|
16519
|
+
CALLOUT,
|
|
16520
|
+
(_2, text3) => `<span class="highlight-word">${text3}</span>`
|
|
16521
|
+
);
|
|
16519
16522
|
const hast = unified().use(rehypeParse, { emitParseErrors: true, fragment: true }).parse(result);
|
|
16520
16523
|
return hast.children;
|
|
16521
16524
|
}
|