Skip to content
21 changes: 21 additions & 0 deletions examples/markdown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions examples/markdown.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<svg>
<rect wh="50 10" md="**Hello** _Markdown_ `world`!"/>
<rect xy="^|h" wh="10 50" text="***Hi* vertical** _Markdown\nwords_ `\ ***literal*** \`!" class="d-markdown d-text-vertical"/>
</svg>
2 changes: 1 addition & 1 deletion src/elements/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ impl SvgElement {
// TODO: refactor this method to handle text event gen better
let phantom = matches!(self.name(), "point" | "box");

if self.has_attr("text") {
if self.has_attr("text") || self.has_attr("md") {
let (orig_elem, text_elements) = process_text_attr(self)?;

if orig_elem.name != "text" && !phantom {
Expand Down
Loading
Loading