From 02c427da233670fbbf1eae4368c4ce6a5c67e76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Tue, 9 Jan 2024 17:15:05 +0100 Subject: [PATCH 1/3] Fixed orphaned markdown elements --- static/js/node.mjs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/static/js/node.mjs b/static/js/node.mjs index aef40ce..4a3332f 100644 --- a/static/js/node.mjs +++ b/static/js/node.mjs @@ -311,7 +311,7 @@ class NodeContent extends Component { var element if (node.RenderMarkdown.value) - element = html`
` + element = html`<${MarkdownContent} key='markdown-content' content=${content} />` else element = html`
@@ -322,18 +322,10 @@ class NodeContent extends Component { return element }//}}} componentDidMount() {//{{{ - const markdown = document.getElementById('markdown') - if (markdown) - markdown.innerHTML = marked.parse(this.props.node.content()) - this.resize() window.addEventListener('resize', () => this.resize()) }//}}} componentDidUpdate() {//{{{ - const markdown = document.getElementById('markdown') - if (markdown) - markdown.innerHTML = marked.parse(this.props.node.content()) - this.resize() }//}}} contentChanged(evt) {//{{{ @@ -371,6 +363,17 @@ class NodeContent extends Component { }//}}} } +class MarkdownContent extends Component { + render({ content }) { + return html`
` + } + componentDidMount() {//{{{ + const markdown = document.getElementById('markdown') + if (markdown) + markdown.innerHTML = marked.parse(this.props.content) + }//}}} +} + class NodeFiles extends Component { render({ node }) {//{{{ if (node.Files === null || node.Files.length == 0) From 39c26f77bc9352042626b7f81f88ea12d033cc58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Tue, 9 Jan 2024 17:19:54 +0100 Subject: [PATCH 2/3] Fixed config for upload path --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index 1684c84..f6b8e01 100644 --- a/main.go +++ b/main.go @@ -80,6 +80,12 @@ func main() { // {{{ } logger.Info("application", "version", VERSION) + config, err = ConfigRead(flagConfig) + if err != nil { + logger.Error("application", "error", err) + os.Exit(1) + } + service, err = webservice.New(flagConfig, VERSION, logger) if err != nil { logger.Error("application", "error", err) From 51502bd694411fe34fe9f6dea90aead792eb94a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Tue, 9 Jan 2024 17:20:02 +0100 Subject: [PATCH 3/3] Bumped to v18 --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index 703a257..3f430af 100644 --- a/version +++ b/version @@ -1 +1 @@ -v17 +v18