[DISCREPANCY] Indentation in the generated markdown file
Describe the discrepancy A clear and concise description of the discrepancy.
The markdown file that is generated from a given .rst file does not work for me. For example, in the markdown file, I need the indentation to be 4 spaces and what I see in the markdown is two spaces. I see * at the start of the line but I need a -. These are with respect to creating an index file.
To Reproduce Steps to reproduce the behavior:
- Clone 'https://github.com/liran-funaro/sphinx-markdown-builder'
Sample '.rst' index file
.. toctree::
:glob:
:maxdepth: 2
doc1
doc2
doc1
###########
This is doc 1
###########
Section 1
-----------------
content in section 1
Section 2
----------------
content in section 2
contents
.. toctree::
:maxdepth: 2
child_doc1
child_doc2
doc2
###########
This is doc 2
###########
Expected output A clear and concise description of the expected output.
- [This is doc 1](doc1)
- [](child_doc1)
- [](child_doc2)
- [This is doc 2)(doc2)
Current output A clear and concise description of the expected output.
* [This is doc 1](doc1)
* [Section 1](path/to/section1)
* [Section 2](path/to/section2)
* [This is doc 2)(doc2)
Environment (please complete the following information):
- OS: [e.g. iOS]
- Version [e.g. 22]
Additional context Add any other context about the discrepancy here.
The indentation is right now only 2 spaces, I need 4. Any way to change this? Also the child_doc1 and child_doc2 are not listed.
To add more info, instead of injecting an * can we have a -? Also, the indentation needed is 4 not 2. This is needed in the md file is used by the mkdocs tools to convert to HTML. And since the indentation and the character are not as needed by mkdocs, the mkdocs does not render the HTML correctly. I could make changes to my work and use it if you let me know where the changes need to go as I understand not everyone would need this.
@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.
@revati-naik I can add configuration options for the default list marker and indentation level. These will be applied to the entire workspace. Not to a specific document. Will that work for you?
This would be a much appreciated enhancement @liran-funaro -- I am running into a similar issue where I am using the output of sphinx-markdown-builder as the input for mkdocs, and my lists break entirely because of this.
@ahjota @revati-naik I added a config parameter "markdown_bullet". You can set it to any value you want.
You can install the latest commit and see if it solves this issue for you. If it solves it, I'll upload a new version soon.
pip uninstall sphinx-markdown-builder
pip install git+https://github.com/liran-funaro/sphinx-markdown-builder.git@main