From 1c278abff931aa3f3efb6183b683c5448d0bf1e6 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Fri, 26 Jan 2024 16:23:12 +0100 Subject: [PATCH] Fixes for the doc parser & Enable about page docs Signed-off-by: Florian Hotze --- .../src/components/developer/help-sidebar.vue | 6 ++++-- .../src/components/developer/help/context.vue | 21 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/components/developer/help-sidebar.vue b/bundles/org.openhab.ui/web/src/components/developer/help-sidebar.vue index c5588a756e..efcc3ca27b 100644 --- a/bundles/org.openhab.ui/web/src/components/developer/help-sidebar.vue +++ b/bundles/org.openhab.ui/web/src/components/developer/help-sidebar.vue @@ -75,11 +75,13 @@ + + - - + + diff --git a/bundles/org.openhab.ui/web/src/components/developer/help/context.vue b/bundles/org.openhab.ui/web/src/components/developer/help/context.vue index 817b529521..621e7c1d0a 100644 --- a/bundles/org.openhab.ui/web/src/components/developer/help/context.vue +++ b/bundles/org.openhab.ui/web/src/components/developer/help/context.vue @@ -31,8 +31,13 @@ export default { return 'https://raw.githubusercontent.com/florian-h05/openhab-docs/mainui-doc-integration/mainui' // TODO: Remove this line // return `https://raw.githubusercontent.com/openhab/openhab-docs/${this.docsBranch}/mainui` }, + localUrl () { + if (!this.$store.state.pagePath.endsWith('/')) return '/' + return this.$store.state.pagePath + }, documentationLink () { - return `${this.docUrl}/mainui${this.path}.html` + if (this.path.endsWith('index')) return `${this.docUrl}/mainui${this.path.replace('index', '')}` + return `${this.docUrl}/mainui${this.path}` } }, watch: { @@ -86,15 +91,15 @@ export default { body = body.replace(/

comments - body = body.replace(/()/gm, '$2') - body = body.replace(/()/gm, '$2') + // Allow embedding framework7 icons by using comments + body = body.replace(//gm, '$1') + body = body.replace(//gm, '$1') + body = body.replace(//gm, '$1') body = body.replace(/
/gm, '
')
             body = body.replace(/<\/pre>/gm, '
')