Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mdfluence/confluence_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'<span style="background-color: #ffe59a;">{text}</span>'
22 changes: 17 additions & 5 deletions test_package/functional/test_plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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^^
Expand All @@ -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.
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion test_package/unit/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
),
(
"==highlighted==\n",
"<mark>",
"background-color: #ffe59a;",
"mark",
),
(
Expand Down
Loading