Skip to content

Commit 77c321b

Browse files
committed
Better
1 parent 1e99136 commit 77c321b

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

examples/document.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Allowed field Data Type Description
1818
Allowed children
1919
================
2020

21-
=============== ==================== ==============================
22-
Allowed child Data Type Description
23-
=============== ==================== ==============================
24-
**sections** `section <Section>`_ *The sections of the document*
25-
=============== ==================== ==============================
21+
=============== ===================== ==============================
22+
Allowed child Data Type Description
23+
=============== ===================== ==============================
24+
**sections** `Section <#section>`_ *The sections of the document*
25+
=============== ===================== ==============================
2626

2727
=======
2828
Section
@@ -42,11 +42,11 @@ Allowed field Data Type Description
4242
Allowed children
4343
================
4444

45-
=============== ======================== ================
46-
Allowed child Data Type Description
47-
=============== ======================== ================
48-
**paragraphs** `paragraph <Paragraph>`_ *The paragraphs*
49-
=============== ======================== ================
45+
=============== ========================= ================
46+
Allowed child Data Type Description
47+
=============== ========================= ================
48+
**paragraphs** `Paragraph <#paragraph>`_ *The paragraphs*
49+
=============== ========================= ================
5050

5151
=========
5252
Paragraph

modelspec/BaseTypes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def insert_links(text, format=MARKDOWN_FORMAT):
394394
if format==MARKDOWN_FORMAT:
395395
text2 += '%s<a href="#%s">%s</a>' % (pre, type.lower(), type)
396396
elif format==RST_FORMAT:
397-
text2 += ('%s'+rst_url_format) % (pre, type, type.lower())
397+
text2 += ('%s'+rst_url_format) % (pre, type, '#'+type.lower())
398398
if int(len(split) / 2.0) != len(split) / 2.0:
399399
text2 += split[-1]
400400
return text2
@@ -454,7 +454,7 @@ def insert_links(text, format=MARKDOWN_FORMAT):
454454
if format == RST_FORMAT:
455455
n = "**%s**" % f
456456
t = "%s" % (
457-
rst_url_format % (type_, type_.lower())
457+
rst_url_format % (type_, '#'+type_.lower())
458458
if referencable
459459
else type_,
460460
)
@@ -514,7 +514,7 @@ def insert_links(text, format=MARKDOWN_FORMAT):
514514
if format == RST_FORMAT:
515515
n = "**%s**" % c
516516
t = "%s" % (
517-
rst_url_format % (type_.lower(), type_)
517+
rst_url_format % (type_, '#'+type_.lower())
518518
if referencable
519519
else type_,
520520
)

0 commit comments

Comments
 (0)