Skip to content

Commit 1602fe9

Browse files
authored
Merge pull request #21 from parikshit14/bug/rst-url-link
updated rst link format
2 parents 4e5d1c6 + 1d9c086 commit 1602fe9

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

examples/document.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +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, i.e the `Paragraph(s) <#paragraph>`_ in the section, probably related to the **title** of the `Document <#document>`_.
27+
A model of a section of the `Document <#document>`__. Will contain one `Paragraph <#paragraph>`__ or more, i.e the `Paragraph(s) <#paragraph>`__ in the section, probably related to the **title** of the `Document <#document>`_.
2828

2929
**Allowed parameters**
3030

@@ -36,11 +36,11 @@ Allowed field Data Type Description
3636

3737
**Allowed children**
3838

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

4545
=========
4646
Paragraph
@@ -49,8 +49,8 @@ A model of a paragraph.
4949

5050
**Allowed parameters**
5151

52-
=============== =========== =============================================================
52+
=============== =========== ==============================================================
5353
Allowed field Data Type Description
54-
=============== =========== =============================================================
55-
**contents** str Paragraph contents, which make up the `Sections <#section>`_.
56-
=============== =========== =============================================================
54+
=============== =========== ==============================================================
55+
**contents** str Paragraph contents, which make up the `Sections <#section>`__.
56+
=============== =========== ==============================================================

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

@@ -633,7 +633,7 @@ def insert_links(text, format=MARKDOWN_FORMAT):
633633
pp = pp[3:]
634634
######################################
635635

636-
text2 = f"{pre}`{rr} <#{ref.lower()}>`_{pp}"
636+
text2 = f"{pre}`{rr} <#{ref.lower()}>`__{pp}"
637637

638638
# print(" > Converted to: %s" % text2)
639639
text = text2

0 commit comments

Comments
 (0)