Skip to content

Commit ab2abeb

Browse files
roberthmergify[bot]
authored andcommitted
doc: Render verbatim @docroot@ on contributing page
In rendered form: ```diff -Add references to the manual using .. +Add references to the manual using [links like this](@docroot@/example.md) ``` (cherry picked from commit 147a34c)
1 parent 0f132fc commit ab2abeb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/manual/source/development/contributing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ prs: 1238
2020
Here's one or more paragraphs that describe the change.
2121
2222
- It's markdown
23-
- Add references to the manual using @docroot@
23+
- Add references to the manual using [links like this](@_at_docroot@/example.md)
2424
```
25+
<!-- for the raw markdown readers: that means using @docroot@ -->
2526

2627
Significant changes should add the following header, which moves them to the top.
2728

doc/manual/substitute.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ def recursive_replace(data: dict[str, t.Any], book_root: Path, search_path: Path
5757
).replace(
5858
'@docroot@',
5959
("../" * len(path_to_chapter.parent.parts) or "./")[:-1]
60+
).replace(
61+
'@_at_',
62+
'@'
6063
),
6164
sub_items = [
6265
recursive_replace(sub_item, book_root, search_path)

0 commit comments

Comments
 (0)