diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-10-04 19:39:36 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-10-04 19:39:36 +0200 |
commit | b672ebca886dd6dc9b0f775eb769764750fd302c (patch) | |
tree | 342bc608e79ed7a248ca849b77d52ff63dbdab8b /docs/refman | |
parent | 0b9c7b74bef2dd5913cc8d96de0fc016d682ead1 (diff) | |
download | meson-b672ebca886dd6dc9b0f775eb769764750fd302c.zip meson-b672ebca886dd6dc9b0f775eb769764750fd302c.tar.gz meson-b672ebca886dd6dc9b0f775eb769764750fd302c.tar.bz2 |
Minor fixups
Diffstat (limited to 'docs/refman')
-rw-r--r-- | docs/refman/generatormd.py | 4 | ||||
-rw-r--r-- | docs/refman/templates/root.mustache | 13 |
2 files changed, 11 insertions, 6 deletions
diff --git a/docs/refman/generatormd.py b/docs/refman/generatormd.py index 704ca3b..abf8a99 100644 --- a/docs/refman/generatormd.py +++ b/docs/refman/generatormd.py @@ -156,7 +156,9 @@ class GeneratorMD(GeneratorBase): return ' | '.join([data_type_to_str(x) for x in typ.resolved]) def len_stripped(s: str) -> int: - return len(re.sub(r'<[^>]+>', '', s)) + s = s.replace(']]', '') + # I know, this regex is ugly but it works. + return len(re.sub(r'\[\[(#|@)*([^\[])', r'\2', s)) def render_signature() -> str: # Skip a lot of computations if the function does not take any arguments diff --git a/docs/refman/templates/root.mustache b/docs/refman/templates/root.mustache index b62a6f6..cd846ac 100644 --- a/docs/refman/templates/root.mustache +++ b/docs/refman/templates/root.mustache @@ -11,7 +11,7 @@ and methods are documented in detail in the following subpages: ## Elementary types {{#elementary}} -{{>root_link}} +{{indent}}- {{&link}} {{/elementary}} ## Functions @@ -21,7 +21,7 @@ to see the description and usage. The objects returned by them are [listed here](#returned-objects). {{#functions}} -{{>root_link}} +{{indent}}- {{&link}} {{/functions}} ## Builtin objects @@ -29,7 +29,7 @@ to see the description and usage. The objects returned by them are These are built-in objects that are always available. {{#builtins}} -{{>root_link}} +{{indent}}- {{&link}} {{/builtins}} ## Returned objects @@ -38,11 +38,14 @@ These are objects that can be returned by [functions](#functions) or other methods. {{#returned}} -{{>root_link}} +{{indent}}- {{&link}} {{/returned}} ## Modules {{#modules}} -{{>root_link}} +{{indent}}- {{&link}} {{/modules}} + + +<!-- The links used to be generated wit {>root_link}, but this is a bit hard to read --> |