diff --git a/snakedoc/smk.py b/snakedoc/smk.py index ae5204c..502b644 100644 --- a/snakedoc/smk.py +++ b/snakedoc/smk.py @@ -149,7 +149,8 @@ def transform_content(self, contentnode: addnodes.desc_content) -> None: node[1][0] += default def handle_signature(self, sig, signode): - signode.insert(1, addnodes.desc_type(text=f"{self.rule_type.value.capitalize()} ")) + signode.insert(1, addnodes.desc_type(text=f"{self.rule_type.value.capitalize()}")) + signode += addnodes.desc_sig_space() signode += addnodes.desc_name(text=sig, source=self.options.get("source", "")) return sig diff --git a/tests/test_regressions/test_build.yml b/tests/test_regressions/test_build.yml index 5d64487..7dd8ffc 100644 --- a/tests/test_regressions/test_build.yml +++ b/tests/test_regressions/test_build.yml @@ -6,54 +6,55 @@ index: "
\n \n\nThis\ - \ is a handwritten docstring.
\na.txt
\n\ -b.txt
\nc\
- \ – set c
d – set d
channels:\n \nRule handwritten¶\nThis is a handwritten docstring.
\n\n- Input:
\na.txt
\n \n- Output:
\nb.txt
\n \n- Params:
\n\nc – set c
\nd – set d
\n\
+
\n \n- Conda:
\n\
+ channels:\n - conda-forge\n\
+ dependencies:\n - pip:\n - conda-forge\ndependencies:\n - pip:\n - test1\n - test2\n
\n\
- \n \n- Resources:
\n\
- mem_mb – 2
\n \n- Config:
\nhandwritten.a – A dummy config parameter used in this rule
\n\
- \n
\n \n\n\n
\n\n\n- \nCheckpoint hw_checkpoint¶
\nThis\
- \ is a handwritten docstring for a checkpoint.
\n\n- Input:
\n\
- a.txt
\n \n- Output:
\nb.txt
\n \n\
-
\n
\n\n\n\nAutodoc¶
\n\n- \nRule alltest1
\n - test2\n\
+
mem_mb – 2
\nhandwritten.a – A dummy config parameter used in\ + \ this rule
\nThis is a handwritten docstring for a checkpoint.
\n\ +a.txt
\nb.txt
\n\ +Here is some documentation.
\nA\ \ file
\nDocs rhymes with socks…
\nDocs rhymes with fox…
\n9.1
\n\
\n\n\n\n\n\nGenerates a random number (between 1 and 3) of empty files.
\n\ @@ -113,15 +115,16 @@ index: "\n \n\nval1
\n\
\n\n\n\n\nThis is a basic Snakemake rule with Google style docstrings.
\n\ @@ -147,9 +150,9 @@ index: "\n \n\nWe can also autodoc single\ \ files.
\n… And single rules
\nThis rule lies within another snakemake file. Looks familiar though!
\n\ @@ -159,15 +162,15 @@ index: "\n \n\nan output file
\n\n\n\n\n… or a list of rules
\nThis is other2…
\nThis is other3…
\n