markdown-mode icon indicating copy to clipboard operation
markdown-mode copied to clipboard

Feature Request: Extension for PlantUML

Open Digicrat opened this issue 5 years ago • 1 comments

I've begun using Plantuml within my Doxygen Markdown files, but I'm missing the ability to quickly preview in place that I can get in org-mode. In some cases, content within the plantuml diagram is currently being parsed as Markdown syntax in annoying ways.

Would it be possible to add support for the Plantuml "@startuml ... @enduml" tags to markdown-mode?

Support for PlantUML within Markdown is currently supported by both Doxygen (as a Doxygen tag) and Gitlab.

Specifically, my thought (to save re-running Doxygen each time I want to preview one diagram) is to have behavior similar to org-babel-mode (but without the extra "#+BEGIN_SRC" blocks such that:

  • Any region between the "@startuml" and "@enduml", inclusive of the tags, should be parsed to plantuml-mode for syntax highlighting.
  • A preview function that can be invoked for the currently focused diagram, wrapping that for PlantUML, that automatically stores the preview in a temporary file that's displayed in a new buffer.
  • Inclusion of PlantUML in Markdown export/preview (though this feature isn't actually useful to me at present)

Digicrat avatar Feb 29 '20 07:02 Digicrat

After posting this, I discovered "plantuml-preview-current-block" command. I bound this to a key in markdown-mode to achieve my desired preview functionality rather easily. It would still be nice to see syntax highlighting and automatic parsing during export in markdown mode though.

Digicrat avatar Mar 03 '20 02:03 Digicrat