Commit cb162df8 authored by Emmanuele Bassi's avatar Emmanuele Bassi 👣
Browse files

Re-instate gtk-doc's function matching

Now that we ignore code blocks, and we have a better regular expression
for it, we can go back and turn "foo_bar()" into `foo_bar()`.
parent 5a48acfb
Pipeline #306809 passed with stage
in 1 minute and 45 seconds
......@@ -17,6 +17,8 @@ ARG_SIGIL_RE = re.compile(r"(^|\W)@([A-Za-z0-9_]+)\b")
CONST_SIGIL_RE = re.compile(r"(^|\W)%([A-Z0-9_]+)\b")
FUNCTION_RE = re.compile(r"\b([a-z][a-z0-9_]*)\(\)")
class GtkDocPreprocessor(Preprocessor):
"""Remove all gtk-doc sigils from the Markdown text"""
......@@ -52,6 +54,9 @@ class GtkDocPreprocessor(Preprocessor):
# Argument sygil
new_line = re.sub(ARG_SIGIL_RE, r"\g<1>`\g<2>`", new_line)
# Function
new_line = re.sub(FUNCTION_RE, r"`\g<1>()`", new_line)
return new_lines
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment