mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Renamed variable, since docs are not written in Markdown
This commit is contained in:
parent
8128497b79
commit
295d005ca4
1 changed files with 4 additions and 4 deletions
|
|
@ -13,14 +13,14 @@ label_re = re.compile(r'\.\. _([^\s:]+):')
|
||||||
|
|
||||||
|
|
||||||
def get_headings(filename, underline="-"):
|
def get_headings(filename, underline="-"):
|
||||||
markdown = (docs_path / filename).open().read()
|
content = (docs_path / filename).open().read()
|
||||||
heading_re = re.compile(r'(\S+)\n\{}+\n'.format(underline))
|
heading_re = re.compile(r'(\S+)\n\{}+\n'.format(underline))
|
||||||
return set(heading_re.findall(markdown))
|
return set(heading_re.findall(content))
|
||||||
|
|
||||||
|
|
||||||
def get_labels(filename):
|
def get_labels(filename):
|
||||||
markdown = (docs_path / filename).open().read()
|
content = (docs_path / filename).open().read()
|
||||||
return set(label_re.findall(markdown))
|
return set(label_re.findall(content))
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('config', app.CONFIG_OPTIONS)
|
@pytest.mark.parametrize('config', app.CONFIG_OPTIONS)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue