liran-funaro / sphinx-markdown-builder

A Sphinx extension to add markdown generation support.
https://pypi.org/project/sphinx-markdown-builder
MIT License
45 stars 20 forks source link

[FEAT] list-table not supported inside sphinx-needs #18

Open revati-naik opened 8 months ago

revati-naik commented 8 months ago

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

I am using the following extensions to build my documentation with sphinx

======================
Test Image With Target
======================

.. image:: /static/markdown.png
   :target: https://github.com/liran-funaro/sphinx-markdown-builder

Download :download:`this example image </static/markdown.png>`.

.. req:: Some requirement
   :id: REQ_1

  .. list-table::
     :header-rows: 1
     :class: tight-table

     * - #
       - Action
       - Expected Result
       - Notes
       - Result
     * - 1
       - Start
       - Test should Start
       - More Notes
       - No result

The same works fine with the HTML builder.

Do I need to do something different for the markdown builder? How can I fix this?

EDIT:

I performed some tests in sphinx-markdown-builder to see how I can use the .. list-table:: in the .rst file. I tried it in two different approaches.

  1. I had the .. list-table:: nested in one of the needs. I have attached the diff patch - test_nested_list_table.PATCH and the markdown file: image-target.md

  2. I had the .. list-table:: as an independent entity in the file (non-nested):

test_list_table.PATCH and the markdown file:

image-target.md

This time I see the right table format.

To Reproduce Create an rst file like above Convert it to markdown with this plugin See similar output in markdown Expected behavior

The nested list-tablke should be displayed inside the table for the SWRQ_SYSTEM_MONITOR_422 requirement

Environment (please complete the following information):

OS: Ubuntu Version: 22.04 Additional context Add any other context about the problem here.

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

Environment (please complete the following information):

Additional context Add any other context about the problem here.

I have also filed a similar issue with sphinx-needs https://github.com/useblocks/sphinx-needs/issues/1161

liran-funaro commented 2 months ago

@revati-naik As sphinx-needs is not supported, this is a feature request.