From af8727025f5cf3437738f66ed59b82690d17a1c2 Mon Sep 17 00:00:00 2001 From: SZN Date: Wed, 11 Sep 2024 19:00:26 +0200 Subject: [PATCH 1/3] rm logger.info --- src/md2cf/utils/confluencemd.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/md2cf/utils/confluencemd.py b/src/md2cf/utils/confluencemd.py index 18e7b98..42c4de2 100644 --- a/src/md2cf/utils/confluencemd.py +++ b/src/md2cf/utils/confluencemd.py @@ -259,7 +259,6 @@ def __attach_images( ) -> None: """Replaces html tags with Confluence specific and uploads images as attachements""" - logger.info("__attach_images %s", page_id) for (_alt, path) in images: rel_path = os.path.join(self.md_file_dir, path) if not os.path.isfile(rel_path): From b02127615c61bc63e156d9493cccfaf804fb7fa1 Mon Sep 17 00:00:00 2001 From: SZN Date: Wed, 11 Sep 2024 19:02:00 +0200 Subject: [PATCH 2/3] temporary fix for code blocks #12 --- src/md2cf/utils/md2html.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/md2cf/utils/md2html.py b/src/md2cf/utils/md2html.py index 6c606bd..96f0c8f 100644 --- a/src/md2cf/utils/md2html.py +++ b/src/md2cf/utils/md2html.py @@ -38,6 +38,7 @@ def md_to_html(md_file: str, md_file_dir = os.path.dirname(md_file) html = __rewrite_images(html, md_file_dir, images) + html = __fix_code_blocks(html) return html, page_id_from_meta, url, images def __parse_confluence_url(meta: Dict[str, str]) -> Tuple[Optional[str], Optional[str]]: @@ -100,6 +101,13 @@ def __rewrite_images(html: str, logger.warning("image tag `%s` not found in html", old) return html +def __fix_code_blocks(html: str) -> str: + """ + @TODO temporary fix for https://github.com/szn/confluence.md/issues/12 + """ + html = html.replace('
', '')
+    return html.replace("
", "") + def __get_file_contents(file: str) -> str: """Return file contents""" with open(file, "r", encoding="utf-8") as stream: From 2fd2bc9901dd7cbad1488f332a97a74ce7299df3 Mon Sep 17 00:00:00 2001 From: SZN Date: Wed, 11 Sep 2024 19:03:20 +0200 Subject: [PATCH 3/3] v0.4.6 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index e675fce..d8d8aba 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = confluence.md -version = 0.4.5 +version = 0.4.6 author = Szymon Nieradka description = Markdown to Confluence - upload any .md files to your Confluence cloud page long_description = file: README.md