umberto 8.0.1 → 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,22 @@
|
|
|
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
|
+
|
|
11
|
+
## [8.0.2](https://github.com/cksource/umberto/compare/v8.0.1...v8.0.2) (July 31, 2025)
|
|
12
|
+
|
|
13
|
+
### Bug fixes
|
|
14
|
+
|
|
15
|
+
* Fixed an issue where code blocks appeared empty when displayed inside a `details` element in Chrome.
|
|
16
|
+
* Changed from `overscroll-behavior: none` to `overscroll-behavior-y: none` on `<html>` and `<body>` elements to allow Mac trackpad swipe gestures for browser navigation.
|
|
17
|
+
* Code blocks in API descriptions are no longer duplicated when there are multiple code blocks withing the same description.
|
|
18
|
+
|
|
19
|
+
|
|
4
20
|
## [8.0.1](https://github.com/cksource/umberto/compare/v8.0.0...v8.0.1) (July 28, 2025)
|
|
5
21
|
|
|
6
22
|
### Bug fixes
|
|
@@ -45,26 +61,6 @@ Changelog
|
|
|
45
61
|
|
|
46
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))
|
|
47
63
|
|
|
48
|
-
|
|
49
|
-
## [7.0.1](https://github.com/cksource/umberto/compare/v7.0.0...v7.0.1) (2025-05-14)
|
|
50
|
-
|
|
51
|
-
### Other changes
|
|
52
|
-
|
|
53
|
-
* Updated the project dependencies. Closes [#1253](https://github.com/cksource/umberto/issues/1253). ([commit](https://github.com/cksource/umberto/commit/28d74364207ab055ad76c2857d58cccb1866559b))
|
|
54
|
-
* Removed dependencies that can be replaced with native APIs or other already used dependencies. ([commit](https://github.com/cksource/umberto/commit/28d74364207ab055ad76c2857d58cccb1866559b))
|
|
55
|
-
* 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))
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## [7.0.0](https://github.com/cksource/umberto/compare/v6.1.2...v7.0.0) (2025-05-05)
|
|
59
|
-
|
|
60
|
-
### BREAKING CHANGES
|
|
61
|
-
|
|
62
|
-
* Rendering TypeScript-based API pages requires an input file generated by Typedoc in version `0.28.0` or later.
|
|
63
|
-
|
|
64
|
-
### Features
|
|
65
|
-
|
|
66
|
-
* Support for rendering TypeScript API pages based on output from `typedoc@0.28`. Closes [#1188](https://github.com/cksource/umberto/issues/1188). ([commit](https://github.com/cksource/umberto/commit/561f94c6b025a0f1dbcc01c0c0e70ee5eeae387e))
|
|
67
|
-
|
|
68
64
|
---
|
|
69
65
|
|
|
70
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
|
/**
|
|
@@ -387,28 +387,29 @@ module.exports = class DescriptionParser {
|
|
|
387
387
|
const theme = options.theme;
|
|
388
388
|
|
|
389
389
|
if ( theme === 'gloria' ) {
|
|
390
|
-
|
|
390
|
+
$( 'pre' ).each( function() {
|
|
391
|
+
const $code = $( this ).find( 'code' );
|
|
391
392
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
393
|
+
if ( !$code || !$code.length ) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
395
396
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
397
|
+
// Get the language from the class (e.g., "language-js" -> "js")
|
|
398
|
+
const language = $code.attr( 'class' ) ?
|
|
399
|
+
$code.attr( 'class' ).replace( 'doc', '' ).replace( 'language-', '' ).replace( 'ts', 'typescript' ).trim() :
|
|
400
|
+
null;
|
|
400
401
|
|
|
401
|
-
|
|
402
|
-
|
|
402
|
+
// Get the code content
|
|
403
|
+
const code = $code.html();
|
|
403
404
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
405
|
+
// Use the render-pug-component utility
|
|
406
|
+
const html = renderCodeBlockPug( {
|
|
407
|
+
language,
|
|
408
|
+
code
|
|
409
|
+
} );
|
|
409
410
|
|
|
410
|
-
|
|
411
|
-
|
|
411
|
+
$( this ).replaceWith( html );
|
|
412
|
+
} );
|
|
412
413
|
} else {
|
|
413
414
|
$( 'pre[class~="source"]' ).each( function() {
|
|
414
415
|
let code = $( this ).html();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@layer layout {
|
|
4
4
|
html {
|
|
5
5
|
height: 100%;
|
|
6
|
-
overscroll-behavior: none;
|
|
6
|
+
overscroll-behavior-y: none; /* Prevent vertical bounce, allow horizontal trackpad gestures. */
|
|
7
7
|
overflow-x: hidden;
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
line-height: var(--line-height-base);
|
|
13
13
|
font-family: var(--font-family-text);
|
|
14
14
|
text-wrap: pretty;
|
|
15
|
-
overscroll-behavior: none;
|
|
15
|
+
overscroll-behavior-y: none; /* Prevent vertical bounce, allow horizontal trackpad gestures. */
|
|
16
16
|
}
|
|
17
17
|
}
|