@tamagui/code-to-html 1.52.2 → 1.52.4
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 +1 -1
- package/dist/cjs/highlightWord.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/highlightLine.js +22 -22
- package/dist/esm/highlightLine.js.map +1 -1
- package/dist/esm/highlightWord.js +22 -22
- package/dist/esm/highlightWord.js.map +1 -1
- package/dist/esm/index.js +22 -22
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -502,7 +502,7 @@ var require_tokenizer = __commonJS({
|
|
|
502
502
|
}
|
|
503
503
|
return -1;
|
|
504
504
|
}
|
|
505
|
-
var Tokenizer = class {
|
|
505
|
+
var Tokenizer = class _Tokenizer {
|
|
506
506
|
constructor() {
|
|
507
507
|
this.preprocessor = new Preprocessor();
|
|
508
508
|
this.tokenQueue = [];
|
|
@@ -552,7 +552,7 @@ var require_tokenizer = __commonJS({
|
|
|
552
552
|
this.preprocessor.retreat();
|
|
553
553
|
}
|
|
554
554
|
this.active = false;
|
|
555
|
-
this.tokenQueue.push({ type:
|
|
555
|
+
this.tokenQueue.push({ type: _Tokenizer.HIBERNATION_TOKEN });
|
|
556
556
|
return true;
|
|
557
557
|
}
|
|
558
558
|
return false;
|
|
@@ -614,7 +614,7 @@ var require_tokenizer = __commonJS({
|
|
|
614
614
|
//Token creation
|
|
615
615
|
_createStartTagToken() {
|
|
616
616
|
this.currentToken = {
|
|
617
|
-
type:
|
|
617
|
+
type: _Tokenizer.START_TAG_TOKEN,
|
|
618
618
|
tagName: "",
|
|
619
619
|
selfClosing: false,
|
|
620
620
|
ackSelfClosing: false,
|
|
@@ -623,7 +623,7 @@ var require_tokenizer = __commonJS({
|
|
|
623
623
|
}
|
|
624
624
|
_createEndTagToken() {
|
|
625
625
|
this.currentToken = {
|
|
626
|
-
type:
|
|
626
|
+
type: _Tokenizer.END_TAG_TOKEN,
|
|
627
627
|
tagName: "",
|
|
628
628
|
selfClosing: false,
|
|
629
629
|
attrs: []
|
|
@@ -631,13 +631,13 @@ var require_tokenizer = __commonJS({
|
|
|
631
631
|
}
|
|
632
632
|
_createCommentToken() {
|
|
633
633
|
this.currentToken = {
|
|
634
|
-
type:
|
|
634
|
+
type: _Tokenizer.COMMENT_TOKEN,
|
|
635
635
|
data: ""
|
|
636
636
|
};
|
|
637
637
|
}
|
|
638
638
|
_createDoctypeToken(initialName) {
|
|
639
639
|
this.currentToken = {
|
|
640
|
-
type:
|
|
640
|
+
type: _Tokenizer.DOCTYPE_TOKEN,
|
|
641
641
|
name: initialName,
|
|
642
642
|
forceQuirks: false,
|
|
643
643
|
publicId: null,
|
|
@@ -651,7 +651,7 @@ var require_tokenizer = __commonJS({
|
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
653
|
_createEOFToken() {
|
|
654
|
-
this.currentToken = { type:
|
|
654
|
+
this.currentToken = { type: _Tokenizer.EOF_TOKEN };
|
|
655
655
|
}
|
|
656
656
|
//Tag attributes
|
|
657
657
|
_createAttr(attrNameFirstCh) {
|
|
@@ -661,7 +661,7 @@ var require_tokenizer = __commonJS({
|
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
663
|
_leaveAttrName(toState) {
|
|
664
|
-
if (
|
|
664
|
+
if (_Tokenizer.getTokenAttr(this.currentToken, this.currentAttr.name) === null) {
|
|
665
665
|
this.currentToken.attrs.push(this.currentAttr);
|
|
666
666
|
} else {
|
|
667
667
|
this._err(ERR.duplicateAttribute);
|
|
@@ -676,9 +676,9 @@ var require_tokenizer = __commonJS({
|
|
|
676
676
|
this._emitCurrentCharacterToken();
|
|
677
677
|
const ct = this.currentToken;
|
|
678
678
|
this.currentToken = null;
|
|
679
|
-
if (ct.type ===
|
|
679
|
+
if (ct.type === _Tokenizer.START_TAG_TOKEN) {
|
|
680
680
|
this.lastStartTagName = ct.tagName;
|
|
681
|
-
} else if (ct.type ===
|
|
681
|
+
} else if (ct.type === _Tokenizer.END_TAG_TOKEN) {
|
|
682
682
|
if (ct.attrs.length > 0) {
|
|
683
683
|
this._err(ERR.endTagWithAttributes);
|
|
684
684
|
}
|
|
@@ -718,11 +718,11 @@ var require_tokenizer = __commonJS({
|
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
_emitCodePoint(cp) {
|
|
721
|
-
let type =
|
|
721
|
+
let type = _Tokenizer.CHARACTER_TOKEN;
|
|
722
722
|
if (isWhitespace(cp)) {
|
|
723
|
-
type =
|
|
723
|
+
type = _Tokenizer.WHITESPACE_CHARACTER_TOKEN;
|
|
724
724
|
} else if (cp === $.NULL) {
|
|
725
|
-
type =
|
|
725
|
+
type = _Tokenizer.NULL_CHARACTER_TOKEN;
|
|
726
726
|
}
|
|
727
727
|
this._appendCharToCurrentCharacterToken(type, toChar(cp));
|
|
728
728
|
}
|
|
@@ -734,7 +734,7 @@ var require_tokenizer = __commonJS({
|
|
|
734
734
|
//NOTE: used then we emit character explicitly. This is always a non-whitespace and a non-null character.
|
|
735
735
|
//So we can avoid additional checks here.
|
|
736
736
|
_emitChars(ch) {
|
|
737
|
-
this._appendCharToCurrentCharacterToken(
|
|
737
|
+
this._appendCharToCurrentCharacterToken(_Tokenizer.CHARACTER_TOKEN, ch);
|
|
738
738
|
}
|
|
739
739
|
// Character reference helpers
|
|
740
740
|
_matchNamedCharacterReference(startCp) {
|
|
@@ -2862,7 +2862,7 @@ var require_formatting_element_list = __commonJS({
|
|
|
2862
2862
|
"../../node_modules/rehype-parse/node_modules/parse5/lib/parser/formatting-element-list.js"(exports, module) {
|
|
2863
2863
|
"use strict";
|
|
2864
2864
|
var NOAH_ARK_CAPACITY = 3;
|
|
2865
|
-
var FormattingElementList = class {
|
|
2865
|
+
var FormattingElementList = class _FormattingElementList {
|
|
2866
2866
|
constructor(treeAdapter) {
|
|
2867
2867
|
this.length = 0;
|
|
2868
2868
|
this.entries = [];
|
|
@@ -2880,7 +2880,7 @@ var require_formatting_element_list = __commonJS({
|
|
|
2880
2880
|
const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);
|
|
2881
2881
|
for (let i = this.length - 1; i >= 0; i--) {
|
|
2882
2882
|
const entry = this.entries[i];
|
|
2883
|
-
if (entry.type ===
|
|
2883
|
+
if (entry.type === _FormattingElementList.MARKER_ENTRY) {
|
|
2884
2884
|
break;
|
|
2885
2885
|
}
|
|
2886
2886
|
const element3 = entry.element;
|
|
@@ -2924,13 +2924,13 @@ var require_formatting_element_list = __commonJS({
|
|
|
2924
2924
|
}
|
|
2925
2925
|
//Mutations
|
|
2926
2926
|
insertMarker() {
|
|
2927
|
-
this.entries.push({ type:
|
|
2927
|
+
this.entries.push({ type: _FormattingElementList.MARKER_ENTRY });
|
|
2928
2928
|
this.length++;
|
|
2929
2929
|
}
|
|
2930
2930
|
pushElement(element3, token) {
|
|
2931
2931
|
this._ensureNoahArkCondition(element3);
|
|
2932
2932
|
this.entries.push({
|
|
2933
|
-
type:
|
|
2933
|
+
type: _FormattingElementList.ELEMENT_ENTRY,
|
|
2934
2934
|
element: element3,
|
|
2935
2935
|
token
|
|
2936
2936
|
});
|
|
@@ -2944,7 +2944,7 @@ var require_formatting_element_list = __commonJS({
|
|
|
2944
2944
|
}
|
|
2945
2945
|
}
|
|
2946
2946
|
this.entries.splice(bookmarkIdx + 1, 0, {
|
|
2947
|
-
type:
|
|
2947
|
+
type: _FormattingElementList.ELEMENT_ENTRY,
|
|
2948
2948
|
element: element3,
|
|
2949
2949
|
token
|
|
2950
2950
|
});
|
|
@@ -2963,7 +2963,7 @@ var require_formatting_element_list = __commonJS({
|
|
|
2963
2963
|
while (this.length) {
|
|
2964
2964
|
const entry = this.entries.pop();
|
|
2965
2965
|
this.length--;
|
|
2966
|
-
if (entry.type ===
|
|
2966
|
+
if (entry.type === _FormattingElementList.MARKER_ENTRY) {
|
|
2967
2967
|
break;
|
|
2968
2968
|
}
|
|
2969
2969
|
}
|
|
@@ -2972,7 +2972,7 @@ var require_formatting_element_list = __commonJS({
|
|
|
2972
2972
|
getElementEntryInScopeWithTagName(tagName) {
|
|
2973
2973
|
for (let i = this.length - 1; i >= 0; i--) {
|
|
2974
2974
|
const entry = this.entries[i];
|
|
2975
|
-
if (entry.type ===
|
|
2975
|
+
if (entry.type === _FormattingElementList.MARKER_ENTRY) {
|
|
2976
2976
|
return null;
|
|
2977
2977
|
}
|
|
2978
2978
|
if (this.treeAdapter.getTagName(entry.element) === tagName) {
|
|
@@ -2984,7 +2984,7 @@ var require_formatting_element_list = __commonJS({
|
|
|
2984
2984
|
getElementEntry(element3) {
|
|
2985
2985
|
for (let i = this.length - 1; i >= 0; i--) {
|
|
2986
2986
|
const entry = this.entries[i];
|
|
2987
|
-
if (entry.type ===
|
|
2987
|
+
if (entry.type === _FormattingElementList.ELEMENT_ENTRY && entry.element === element3) {
|
|
2988
2988
|
return entry;
|
|
2989
2989
|
}
|
|
2990
2990
|
}
|