mikitex70 / plantuml-markdown

PlantUML plugin for Python-Markdown
BSD 2-Clause "Simplified" License
192 stars 55 forks source link

PlantUMLIncluder#_readFileRec strip causes @startyaml broken #72

Closed Martin91 closed 1 year ago

Martin91 commented 1 year ago

Reference to this official document of YAML data: https://plantuml.com/yaml, plantuml supports rendering YAML data.

But this project always trims spaces, this behavior causes the source YAML data will lost all leading indentations. https://github.com/mikitex70/plantuml-markdown/blob/9f968f6fccf7651d0054c6234eb789154a94a417/plantuml_markdown.py#L414

To be more compatible, maybe it can skip the trimming work once it meets a @startyaml tag? Or provide an explicit option specifying unnecessary to trim leading spaces?

Martin91 commented 1 year ago

FYI, downgrading to v3.5.3 fixs the problem

mikitex70 commented 1 year ago

Hi @Martin91, try version 3.6.3 (just released), it should fix your issue.

Martin91 commented 1 year ago

Hi @Martin91, try version 3.6.3 (just released), it should fix your issue.

Ok, will upgrade later