@tamagui/code-to-html 1.0.1-rc.5 → 1.0.1-rc.6
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
|
@@ -9849,7 +9849,10 @@ function looksLikeAVFileValue(value) {
|
|
|
9849
9849
|
var CALLOUT = /__(.*?)__/g;
|
|
9850
9850
|
function highlightWord(code) {
|
|
9851
9851
|
const html5 = toHtml(code);
|
|
9852
|
-
const result = html5.replace(
|
|
9852
|
+
const result = html5.replace(
|
|
9853
|
+
CALLOUT,
|
|
9854
|
+
(_, text3) => `<span class="highlight-word">${text3}</span>`
|
|
9855
|
+
);
|
|
9853
9856
|
const hast = unified().use(rehypeParse, { emitParseErrors: true, fragment: true }).parse(result);
|
|
9854
9857
|
return hast.children;
|
|
9855
9858
|
}
|