umberto 8.0.2 → 8.0.3
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [8.0.3](https://github.com/cksource/umberto/compare/v8.0.2...v8.0.3) (August 5, 2025)
|
|
5
|
+
|
|
6
|
+
### Bug fixes
|
|
7
|
+
|
|
8
|
+
* The backticks in the XML components parser were not escaped correctly, causing issues with parsing XML content. This fix ensures that backticks are properly escaped, allowing the parser to handle XML content containing backticks without errors.
|
|
9
|
+
|
|
10
|
+
|
|
4
11
|
## [8.0.2](https://github.com/cksource/umberto/compare/v8.0.1...v8.0.2) (July 31, 2025)
|
|
5
12
|
|
|
6
13
|
### Bug fixes
|
|
@@ -54,15 +61,6 @@ Changelog
|
|
|
54
61
|
|
|
55
62
|
* Fixed an invalid protocol (should be `https://` instead of `https:/`) in the generated index sitemap file. Closes [#1277](https://github.com/cksource/umberto/issues/1277). ([commit](https://github.com/cksource/umberto/commit/6f59654e85b1230fbfe029efe68f708755ec6342))
|
|
56
63
|
|
|
57
|
-
|
|
58
|
-
## [7.0.1](https://github.com/cksource/umberto/compare/v7.0.0...v7.0.1) (2025-05-14)
|
|
59
|
-
|
|
60
|
-
### Other changes
|
|
61
|
-
|
|
62
|
-
* Updated the project dependencies. Closes [#1253](https://github.com/cksource/umberto/issues/1253). ([commit](https://github.com/cksource/umberto/commit/28d74364207ab055ad76c2857d58cccb1866559b))
|
|
63
|
-
* Removed dependencies that can be replaced with native APIs or other already used dependencies. ([commit](https://github.com/cksource/umberto/commit/28d74364207ab055ad76c2857d58cccb1866559b))
|
|
64
|
-
* Sitemaps will be generated separately for each project. Closes [#1254](https://github.com/cksource/umberto/issues/1254). ([commit](https://github.com/cksource/umberto/commit/7968755b2a4b1c23768a9420292eb1d168b898b3))
|
|
65
|
-
|
|
66
64
|
---
|
|
67
65
|
|
|
68
66
|
To see all releases, visit the [release page](https://github.com/cksource/umberto/releases).
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ const removeIndentation = require( '../../remove-indentation.js' );
|
|
|
11
11
|
const ParserCursor = require( '../../parser-cursor.js' );
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* A parser for converting
|
|
14
|
+
* A parser for converting markdown containing HTML-like markup into a tree structure.
|
|
15
15
|
* Uses a cursor-based approach with backtracking capabilities for robust parsing.
|
|
16
16
|
*/
|
|
17
17
|
module.exports = class XMLComponentsParser {
|
|
@@ -292,32 +292,28 @@ module.exports = class XMLComponentsParser {
|
|
|
292
292
|
* @returns The content between backticks including the backticks themselves.
|
|
293
293
|
*/
|
|
294
294
|
#eatBacktick = this.#tryOrRestoreCursor( () => {
|
|
295
|
-
|
|
296
|
-
this.#cursor.index
|
|
295
|
+
const { text } = this.#cursor;
|
|
296
|
+
const startIndex = this.#cursor.index;
|
|
297
297
|
|
|
298
|
-
|
|
299
|
-
const ch = this.#cursor.text[ this.#cursor.index ];
|
|
298
|
+
let backtickSequence = '';
|
|
300
299
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
while ( this.#cursor.index < text.length && text[ this.#cursor.index ] === '`' ) {
|
|
301
|
+
backtickSequence += '`';
|
|
302
|
+
this.#cursor.index++;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const openingBackticksLength = backtickSequence.length;
|
|
306
|
+
|
|
307
|
+
while ( this.#cursor.index < text.length ) {
|
|
308
|
+
if ( text.substring( this.#cursor.index, this.#cursor.index + openingBackticksLength ) === backtickSequence ) {
|
|
309
|
+
this.#cursor.index += openingBackticksLength;
|
|
304
310
|
break;
|
|
305
311
|
}
|
|
306
312
|
|
|
307
|
-
|
|
308
|
-
acc += '\\';
|
|
309
|
-
this.#cursor.index++;
|
|
310
|
-
if ( this.#cursor.index < this.#cursor.text.length ) {
|
|
311
|
-
acc += this.#cursor.text[ this.#cursor.index ];
|
|
312
|
-
this.#cursor.index++;
|
|
313
|
-
}
|
|
314
|
-
} else {
|
|
315
|
-
acc += ch;
|
|
316
|
-
this.#cursor.index++;
|
|
317
|
-
}
|
|
313
|
+
this.#cursor.index++;
|
|
318
314
|
}
|
|
319
315
|
|
|
320
|
-
return
|
|
316
|
+
return text.substring( startIndex, this.#cursor.index );
|
|
321
317
|
} );
|
|
322
318
|
|
|
323
319
|
/**
|