File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
# reStructuredText (RST) to GitHub-flavored Markdown converter
3
3
4
- import re
5
4
import sys
6
5
from docutils import core , nodes , writers
7
6
from urllib import parse
@@ -32,8 +31,7 @@ def depart_section(self, node):
32
31
raise nodes .StopTraversal
33
32
34
33
def visit_title (self , node ):
35
- self .version = re .match (r"(\d+\.\d+\.\d+).*" , node .children [0 ]).group (1 )
36
- raise nodes .SkipChildren
34
+ pass
37
35
38
36
def visit_title_reference (self , node ):
39
37
raise Exception (
Original file line number Diff line number Diff line change @@ -834,7 +834,14 @@ def getMarkdownParagraph(self, node):
834
834
self .app .config .html_baseurl ,
835
835
self .docname + ".html#" + title .parent ["ids" ][0 ],
836
836
)
837
- markdown += f"\n \n *See also: [{ self .props_section_title } ]({ url } )*"
837
+ if (
838
+ self .props_section_title is not None
839
+ and self .props_section_title .endswith (title .astext ())
840
+ ):
841
+ markdown += f"\n \n *See also: [{ self .props_section_title } ]({ url } )*"
842
+ else :
843
+ markdown += f"\n \n *See also: [{ self .getMarkdown (title )} ]({ url } )*"
844
+
838
845
return markdown
839
846
840
847
def update_prop (self , node , props ):
You can’t perform that action at this time.
0 commit comments