Skip to content

Commit 8d9ef79

Browse files
committed
updated rst link format
1 parent c5b89e6 commit 8d9ef79

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

examples/document.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ Allowed field Data Type Description
1515

1616
**Allowed children**
1717

18-
=============== ===================== ==============================
19-
Allowed child Data Type Description
20-
=============== ===================== ==============================
21-
**sections** `Section <#section>`_ *The sections of the document*
22-
=============== ===================== ==============================
18+
=============== ====================== ==============================
19+
Allowed child Data Type Description
20+
=============== ====================== ==============================
21+
**sections** `Section <#section>`__ *The sections of the document*
22+
=============== ====================== ==============================
2323

2424
=======
2525
Section
2626
=======
27-
A model of a section of the `Document <#document>`_ . Will contain one `Paragraph <#paragraph>`_ or more
28-
27+
A model of a section of the `Document <#document>`__ . Will contain one `Paragraph <#paragraph>`__ or more.
2928

3029
**Allowed parameters**
3130

@@ -37,11 +36,11 @@ Allowed field Data Type Description
3736

3837
**Allowed children**
3938

40-
=============== ========================= ================
41-
Allowed child Data Type Description
42-
=============== ========================= ================
43-
**paragraphs** `Paragraph <#paragraph>`_ *The paragraphs*
44-
=============== ========================= ================
39+
=============== ========================== ================
40+
Allowed child Data Type Description
41+
=============== ========================== ================
42+
**paragraphs** `Paragraph <#paragraph>`__ *The paragraphs*
43+
=============== ========================== ================
4544

4645
=========
4746
Paragraph
@@ -55,3 +54,4 @@ Allowed field Data Type Description
5554
=============== =========== ===================================================
5655
**contents** str *Paragraph contents, which make up the _Section_s.*
5756
=============== =========== ===================================================
57+

src/modelspec/base_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def _cls_generate_documentation(cls, format: str = MARKDOWN_FORMAT):
581581

582582
print(f" - {cls.__name__} ({definition})")
583583

584-
rst_url_format = "`%s <%s>`_"
584+
rst_url_format = "`%s <%s>`__"
585585

586586
def insert_links(text, format=MARKDOWN_FORMAT):
587587

@@ -612,7 +612,7 @@ def insert_links(text, format=MARKDOWN_FORMAT):
612612
if format == MARKDOWN_FORMAT:
613613
text2 = f'{pre}<a href="#{ref.lower()}">{ref}</a>{post}'
614614
elif format == RST_FORMAT:
615-
text2 = f"{pre}`{ref} <#{ref.lower()}>`_ {post}"
615+
text2 = f"{pre}`{ref} <#{ref.lower()}>`__ {post}"
616616

617617
# print(" > Converted to: %s" % text2)
618618
text = text2

0 commit comments

Comments
 (0)