Merge pull request #3135 from nsoranzo/followup_on_3086

Use sed instead of pandoc to insert TOC in schema doc
This commit is contained in:
Martin Cech
2016-11-07 21:43:00 -07:00
committed by GitHub
+3 -1
View File
@@ -48,8 +48,10 @@ schema.md: parse_gx_xsd.py schema_template.md ../lib/galaxy/tools/xsd/galaxy.xsd
python parse_gx_xsd.py schema_template.md ../lib/galaxy/tools/xsd/galaxy.xsd > $@
source/dev/schema.rst: schema.md ## Convert Galaxy Tool XSD Markdown docs into reStructuredText (expects pandoc in environment)
pandoc schema.md -f markdown_github-hard_line_breaks -s --toc --toc-depth=2 -o $@
pandoc schema.md -f markdown_github-hard_line_breaks -s -o $@
sed -i -e 's|.. code:: xml|.. code-block:: xml|g' $@
# Insert table of contents
sed -i -e '/^``tool``$$/i .. contents:: Table of contents\n :local:\n :depth: 1\n..\n' $@
# might also want to do
# cd source/lib; hg revert; rm *.rst.orig; or not.