sphinx-markdown-builder icon indicating copy to clipboard operation
sphinx-markdown-builder copied to clipboard

[FEATURE REQUEST] No support for plantuml diagrams

Open revati-naik opened this issue 2 years ago • 5 comments

Describe the bug A clear and concise description of what the bug is.

I have links to certain plantuml diagrams in my .rst file.

I use it in the `.rst file as

.. uml:: path_to_uml/file.puml

The extensions I use are:

  1. sphinx-makrdown-builder v0.6.6
  2. sphinxcontrib.plantuml v0.27
  3. sphinx-needs v1.2.2

It works fine with HTML builder and I see the diagrams generated just right. In the markdown, I see empty blocks. No reference of uml diagrams exist in the generate markdown file

If I add it as a need type

The directive added in the conf.py file is .. uml::.

directive="uml", title="UML", prefix="UML_", color="#BFD8D2", style="node"

This is what my markdown looks like

<a id="UML_5EDCF"></a>

| UML: **path\_to\_uml/file.puml** [UML_5EDCF](#UML_5EDCF)  ![image](/home/$USERinternal_python_vendor_sphinx_needs/site-packages/sphinx_needs/images/feather_svg/arrow-down-circle.svg)![image](//home/$USER/internal_python_vendor_sphinx_needs/site-packages/sphinx_needs/images/feather_svg/arrow-right-circle.svg) <br/><br/>   |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <br/><br/><br/>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

However, I do want to add it as a need type.

To Reproduce Steps to reproduce the behavior:

  1. Clone [email protected]:sphinx-doc/sphinx.git
  2. Install packages 'sphinxcontrib-plantuml==0.27, sphinx-markdown-builder, sphinx-needs==1.2.2`
  3. Run sphinx-build -M markdown input_dir output_dir
  4. Add the above.rst file
  5. See error as the missing signature of uml dagram

Expected behavior A clear and concise description of what you expected to happen

Just like the HTML markdown supports uml images, the markdown builder should also render the images. Atleast to begin with I need to see the signature of the uml in the .md file. For example, in case f drawio images, I see the sphinxcontrib.drawio working to add the ![image](image.drawio) in the markdown file.

Environment (please complete the following information):

  • OS: [e.g. iOS] Ubuntu
  • Version [e.g. 22] 22.04

Additional context Add any other context about the problem here.

revati-naik avatar Oct 12 '23 01:10 revati-naik

@revati-naik Thank you for the report. I'm sorry it took so much time to reply. I've been on vacation, followed by a war. I'll attend to this issue in the following weeks.

liran-funaro avatar Dec 03 '23 13:12 liran-funaro

@liran-funaro Do we have any update on this?

revati-naik avatar Mar 20 '24 20:03 revati-naik

Hi @revati-naik. Please try to create a minimalistic example to reproduce this issue.

liran-funaro avatar Mar 21 '24 11:03 liran-funaro

Hi @revati-naik. Please try to create a minimalistic example to reproduce this issue.

I just updated the first comment.

And to add more context, please find the diff patch for my test. I tried to add a .. uml:: directive in the image-target.rst file.

test_uml.PATCH

And I see the following warning:

markdown-builder/tests/source/image-target.rst:13: WARNING: unknown node type: <plantuml: >

Also, I do not feel my initial approach of adding plantuml as a directive was correct.

revati-naik avatar Mar 21 '24 21:03 revati-naik

I modified the title to be a feature request. I don't have plans to add more features at the time. But I will keep this issue open if I will have time for it in the future.

liran-funaro avatar May 12 '24 07:05 liran-funaro