fixes
This commit is contained in:
@@ -324,7 +324,7 @@ def format_variables(items, show_extra=True):
|
||||
|
||||
|
||||
def create_toc(readme):
|
||||
'Create a Markdown table of contents a Markdown table of contents.'
|
||||
'Create a Markdown table of contents a for README.'
|
||||
doc = marko.parse(readme)
|
||||
lines = []
|
||||
headings = [x for x in doc.children if x.get_type() == 'Heading']
|
||||
@@ -344,7 +344,7 @@ def create_toc(readme):
|
||||
|
||||
def get_doc(readme):
|
||||
'Check if README file is marked, and return current doc.'
|
||||
m = re.search("(?sm)%s(.*)%s" % (MARK_BEGIN, MARK_END), readme)
|
||||
m = re.search('(?sm)%s(.*)%s' % (MARK_BEGIN, MARK_END), readme)
|
||||
if not m:
|
||||
return
|
||||
return {'doc': m.group(1).strip(), 'start': m.start(), 'end': m.end()}
|
||||
@@ -352,7 +352,7 @@ def get_doc(readme):
|
||||
|
||||
def get_toc(readme):
|
||||
'Check if README file is marked, and return current toc.'
|
||||
t = re.search("(?sm)%s(.*)%s" % (TOC_BEGIN, TOC_END), readme)
|
||||
t = re.search('(?sm)%s(.*)%s' % (TOC_BEGIN, TOC_END), readme)
|
||||
if not t:
|
||||
return
|
||||
return {'toc': t.group(1).strip(), 'start': t.start(), 'end': t.end()}
|
||||
|
||||
Reference in New Issue
Block a user