Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ graph TD
GitHub admonitions are automatically translated to sphinx.

> [!NOTE]
> Note content
> Note `markdown` content

> [!TIP]
> Tip content
Expand Down
4 changes: 2 additions & 2 deletions yardang/conf.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def run_convert_github_admonitions_to_rst(app, filename, lines):
# look for admonition key
for admonition_key in _GITHUB_ADMONITIONS:
if admonition_key in line:
line = line.replace(admonition_key, "\n```{}\n.. {}::\n".format("{eval-rst}", _GITHUB_ADMONITIONS[admonition_key]))
line = line.replace(admonition_key, ":::{" + _GITHUB_ADMONITIONS[admonition_key] + "}\n")
# start replacing quotes in subsequent lines
replacing = True
break
Expand All @@ -180,7 +180,7 @@ def run_convert_github_admonitions_to_rst(app, filename, lines):
line = line.replace("> ", " ")
elif replacing:
# missing "> ", so stop replacing and terminate directive
line = f"\n```\n{line}"
line = f"\n:::\n{line}"
replacing = False
# swap line back in splits
orig_line_splits[j] = line
Expand Down
Loading