From 7cf81bfcbcf4c4cdae11d77815e31728e0496578 Mon Sep 17 00:00:00 2001 From: geopanther Date: Fri, 12 Jun 2026 16:37:28 +0200 Subject: [PATCH 1/3] feat: add mark plugin highlighting with yellow background Implement mark() method in ConfluenceRenderer to render ==text== syntax as yellow highlighted text using inline Confluence style. --- mdfluence/confluence_renderer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mdfluence/confluence_renderer.py b/mdfluence/confluence_renderer.py index e6ff9f7..0bb4415 100644 --- a/mdfluence/confluence_renderer.py +++ b/mdfluence/confluence_renderer.py @@ -394,3 +394,6 @@ def block_alert(self, text, alert_type="NOTE"): body_tag.text = text root.append(body_tag) return root.render() + + def mark(self, text): + return f'{text}' From 27a0c85a47fc0789655ed99b1f7b0a3e7a7f36a5 Mon Sep 17 00:00:00 2001 From: geopanther Date: Fri, 12 Jun 2026 16:48:12 +0200 Subject: [PATCH 2/3] test: enhance test_plugins showcase with math and formatting examples - Add bold/italics formatting examples for clarity - Expand math section with inline/block variations and edge cases - Document dollar sign handling in prices and multi-line formulas - Clarify abbreviation behavior with inline comments --- test_package/functional/test_plugins.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/test_package/functional/test_plugins.md b/test_package/functional/test_plugins.md index 2e72b3c..ac64cec 100644 --- a/test_package/functional/test_plugins.md +++ b/test_package/functional/test_plugins.md @@ -25,6 +25,8 @@ Mistune supports footnotes[^1] and multiple references[^2]. ## Formatting +- Bold: **this text is bold**, (__alternative bold text__) +- Italics: *this text is in italics*, (_alternative italics text_) - Strikethrough: ~~this text is deleted~~ - Highlight: ==this text is marked== - Insert: ^^this text was inserted^^ @@ -33,14 +35,24 @@ Mistune supports footnotes[^1] and multiple references[^2]. ## Math -Inline math: $E = mc^2$ +Inline math: -Block math: +Inline math w/o surrouding spaces: $E = mc^2$ + +Inline math w/ surrounding spaces: $ a^2 + b^2 = c^2 $ +Block math: $$ \sum_{i=1}^{n} x_i = x_1 + x_2 + \cdots + x_n $$ +The next 2 lines should NOT be rendered as math: + +Prices: Product A is $5,600.00 and Product B is $7,600.00. + +Single-Line Formula over serveral lines: $ a^2 + b^2 = +c^2 $ + ## Spoiler >! This is a spoiler block that should be hidden by default. @@ -62,9 +74,9 @@ Documentation at https://mistune.lepture.com/en/latest/plugins.html is helpful. The HTML specification is maintained by the W3C. You can write CSS alongside your HTML documents. -*[HTML]: Hyper Text Markup Language -*[W3C]: World Wide Web Consortium -*[CSS]: Cascading Style Sheets +*[HTML]: Hyper Text Markup Language (Should not be rendered) +*[W3C]: World Wide Web Consortium (same as above) +*[CSS]: Cascading Style Sheets (same as above) ## Standard Markdown (no plugin needed) From 4254a65dd43349206b73167aaed032d9573a421c Mon Sep 17 00:00:00 2001 From: geopanther Date: Fri, 12 Jun 2026 16:49:44 +0200 Subject: [PATCH 3/3] test: update mark plugin assertion to match span implementation Changed expected substring from '' to 'background-color: #ffe59a;' to verify the mark plugin renders highlighted text with inline CSS styling. --- test_package/unit/test_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_package/unit/test_plugins.py b/test_package/unit/test_plugins.py index 12a3c51..c589689 100644 --- a/test_package/unit/test_plugins.py +++ b/test_package/unit/test_plugins.py @@ -28,7 +28,7 @@ ), ( "==highlighted==\n", - "", + "background-color: #ffe59a;", "mark", ), (