@d10f/asciidoc-astro-loader 0.0.11 → 0.0.13
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.
|
@@ -80,9 +80,16 @@ var transformerPrompt = (options) => {
|
|
|
80
80
|
const skipCurrent = skipNext;
|
|
81
81
|
skipNext = false;
|
|
82
82
|
const lastChild = hast.children.at(-1);
|
|
83
|
-
if (lastChild
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
if (lastChild) {
|
|
84
|
+
if (lastChild.children[0].value.match(/\s+\\(?:\\)?\s*$/)) {
|
|
85
|
+
skipNext = true;
|
|
86
|
+
} else if (
|
|
87
|
+
// @ts-expect-error property "children" does exist
|
|
88
|
+
lastChild.children[0].value.match(/\s+\\n\s*$/)
|
|
89
|
+
) {
|
|
90
|
+
skipNext = true;
|
|
91
|
+
lastChild.children[0].value = "";
|
|
92
|
+
}
|
|
86
93
|
}
|
|
87
94
|
if (skipCurrent) return;
|
|
88
95
|
hast.children.unshift({
|
package/dist/index.cjs
CHANGED
|
@@ -804,9 +804,16 @@ var transformerPrompt = (options) => {
|
|
|
804
804
|
const skipCurrent = skipNext;
|
|
805
805
|
skipNext = false;
|
|
806
806
|
const lastChild = hast.children.at(-1);
|
|
807
|
-
if (lastChild
|
|
808
|
-
|
|
809
|
-
|
|
807
|
+
if (lastChild) {
|
|
808
|
+
if (lastChild.children[0].value.match(/\s+\\(?:\\)?\s*$/)) {
|
|
809
|
+
skipNext = true;
|
|
810
|
+
} else if (
|
|
811
|
+
// @ts-expect-error property "children" does exist
|
|
812
|
+
lastChild.children[0].value.match(/\s+\\n\s*$/)
|
|
813
|
+
) {
|
|
814
|
+
skipNext = true;
|
|
815
|
+
lastChild.children[0].value = "";
|
|
816
|
+
}
|
|
810
817
|
}
|
|
811
818
|
if (skipCurrent) return;
|
|
812
819
|
hast.children.unshift({
|
package/dist/index.js
CHANGED
|
@@ -109,9 +109,16 @@ var transformerPrompt = (options) => {
|
|
|
109
109
|
const skipCurrent = skipNext;
|
|
110
110
|
skipNext = false;
|
|
111
111
|
const lastChild = hast.children.at(-1);
|
|
112
|
-
if (lastChild
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
if (lastChild) {
|
|
113
|
+
if (lastChild.children[0].value.match(/\s+\\(?:\\)?\s*$/)) {
|
|
114
|
+
skipNext = true;
|
|
115
|
+
} else if (
|
|
116
|
+
// @ts-expect-error property "children" does exist
|
|
117
|
+
lastChild.children[0].value.match(/\s+\\n\s*$/)
|
|
118
|
+
) {
|
|
119
|
+
skipNext = true;
|
|
120
|
+
lastChild.children[0].value = "";
|
|
121
|
+
}
|
|
115
122
|
}
|
|
116
123
|
if (skipCurrent) return;
|
|
117
124
|
hast.children.unshift({
|