@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 && // @ts-expect-error property "children" does exist
84
- lastChild.children[0].value.match(/\s+\\(?:\\)?\s*$/)) {
85
- skipNext = true;
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 && // @ts-expect-error property "children" does exist
808
- lastChild.children[0].value.match(/\s+\\(?:\\)?\s*$/)) {
809
- skipNext = true;
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
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  transformAsciidocCallout,
6
6
  transformerPrompt
7
- } from "./chunk-KPEWXJBE.js";
7
+ } from "./chunk-GG5JBQCP.js";
8
8
  import {
9
9
  slugify,
10
10
  splitFilenameComponents
@@ -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 && // @ts-expect-error property "children" does exist
113
- lastChild.children[0].value.match(/\s+\\(?:\\)?\s*$/)) {
114
- skipNext = true;
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({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  transformAsciidocCallout,
3
3
  transformerPrompt
4
- } from "../../../chunk-KPEWXJBE.js";
4
+ } from "../../../chunk-GG5JBQCP.js";
5
5
  import "../../../chunk-2UGTFP4R.js";
6
6
  export {
7
7
  transformAsciidocCallout,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d10f/asciidoc-astro-loader",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "An Astro collections loader for Asciidoc files",
5
5
  "author": "D10f",
6
6
  "license": "MIT",