Skip to content

Commit

Permalink
Docs: Fix Markdown escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Jun 10, 2023
1 parent 40b4148 commit dd392e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 3 additions & 2 deletions docs/generate_input_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ def render_keyword(
output: List[str] = []
output += [f"```{{py:data}} {keyword_names[0]}"]
n_var_brackets = f"[{n_var}]" if n_var > 1 else ""
output += [f":type: {data_type}{n_var_brackets}"]
output += [f":type: '{data_type}{n_var_brackets}'"]
if default_value:
output += [f":value: {default_value}"]
output += [f":value: '{default_value}'"]
output += [""]
if len(keyword_names) > 1:
aliases = " ,".join(keyword_names)
Expand Down Expand Up @@ -260,6 +260,7 @@ def get_text(element: Optional[lxml.etree._Element]) -> str:
# =======================================================================================
def escape_markdown(text: str) -> str:
text = text.replace("__", "\_\_")
text = text.replace("#", "\#")
return text


Expand Down
6 changes: 0 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,3 @@ units
```

% TODO: `{toctree} % :caption: Explanations % % dummy % `

# Indices and tables

- {ref}`genindex`
- {ref}`modindex`
- {ref}`search`

0 comments on commit dd392e0

Please sign in to comment.