@uniweb/core 1.2.5 → 1.3.0
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/package.json +2 -2
- package/src/website.js +2 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Core classes for the Uniweb platform - Uniweb, Website, Page, Block",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"vitest": "^4.1.7"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@uniweb/semantic-parser": "~1.
|
|
52
|
+
"@uniweb/semantic-parser": "~1.12.0",
|
|
53
53
|
"@uniweb/theming": "~1.2.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
package/src/website.js
CHANGED
|
@@ -798,17 +798,8 @@ export default class Website {
|
|
|
798
798
|
* makeHref('/about') // → '/about' (passthrough)
|
|
799
799
|
*/
|
|
800
800
|
makeHref(href) {
|
|
801
|
-
if (!href) return href
|
|
802
|
-
|
|
803
|
-
// Support both page: (current) and topic: (legacy) prefixes
|
|
804
|
-
let withoutPrefix
|
|
805
|
-
if (href.startsWith('page:')) {
|
|
806
|
-
withoutPrefix = href.slice(5)
|
|
807
|
-
} else if (href.startsWith('topic:')) {
|
|
808
|
-
withoutPrefix = href.slice(6)
|
|
809
|
-
} else {
|
|
810
|
-
return href
|
|
811
|
-
}
|
|
801
|
+
if (!href || !href.startsWith('page:')) return href
|
|
802
|
+
const withoutPrefix = href.slice(5)
|
|
812
803
|
|
|
813
804
|
// Parse page reference: page:pageId#sectionId
|
|
814
805
|
const [pageId, sectionId] = withoutPrefix.split('#')
|