mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Added plugin_config() method
This commit is contained in:
parent
1905c03364
commit
0a14a4846b
6 changed files with 114 additions and 6 deletions
|
|
@ -14,8 +14,8 @@ label_re = re.compile(r'\.\. _([^\s:]+):')
|
|||
|
||||
def get_headings(filename, underline="-"):
|
||||
content = (docs_path / filename).open().read()
|
||||
heading_re = re.compile(r'(\S+)\n\{}+\n'.format(underline))
|
||||
return set(heading_re.findall(content))
|
||||
heading_re = re.compile(r'(\w+)(\([^)]*\))?\n\{}+\n'.format(underline))
|
||||
return set(h[0] for h in heading_re.findall(content))
|
||||
|
||||
|
||||
def get_labels(filename):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue