Reputation: 1644
sphinx-build
modifies the formatting of my RST files, and I can't figure out how to get it to stop. It only happens after I run make html
, and my IDE (PyCharm) isn't doing the formatting.
Before make html
:
General use plots
-----------------
.. autosummary::
:toctree: generated/
Study.plot_gene
Study.plot_event
After make html
:
General use plots
-----------------
.. autosummary::
:toctree: generated/
Study.plot_gene
Study.plot_event
This is my make html
command (same as sphinx-quickstart
):
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
And the full before/after, plus my conf.py
are in: https://gist.github.com/olgabot/d8bb75b9d88bed19cb18
Upvotes: 1
Views: 135
Reputation: 89454
If you mean that the files are being edited in-place, then that is extremely surprising and — at a wild guess — would probably be because of one of the non-standard Sphinx extensions listed in your extensions = [...]
list. To discover which one, you could try removing write permission from the .rst
file, with a command like:
chmod a-w general_use_plots.rst
Unless the module attempting the modification is an exceptionally clever one, it will attempt the write without even checking the permissions bits first, and will be killed with an exception when it tries to open the file in write mode. You could then look at the stack trace and (hopefully) learn which extension’s code is incorrectly trying to touch your source.
If you do get a stack trace back, you could add it to the text of your question.
Upvotes: 1