mirror of
http://github.com/valkey-io/valkey
synced 2024-11-21 08:37:40 +00:00
Module api doc generator, fixing issue with negative lookback terminating at "." (#10832)
There is a little regex that wraps up all the free-floating functions in the doc-block e.g. malloc() with backticks. in case of `redis.call()`, it used to wrap just `call()` in backticks.
This commit is contained in:
parent
f22bfe86b6
commit
9e40b076dd
@ -20,7 +20,7 @@ def markdown(s)
|
||||
# Add backquotes around RedisModule functions and type where missing.
|
||||
l = l.gsub(/(?<!`)RedisModule[A-z]+(?:\*?\(\))?/){|x| "`#{x}`"}
|
||||
# Add backquotes around c functions like malloc() where missing.
|
||||
l = l.gsub(/(?<![`A-z])[a-z_]+\(\)/, '`\0`')
|
||||
l = l.gsub(/(?<![`A-z.])[a-z_]+\(\)/, '`\0`')
|
||||
# Add backquotes around macro and var names containing underscores.
|
||||
l = l.gsub(/(?<![`A-z\*])[A-Za-z]+_[A-Za-z0-9_]+/){|x| "`#{x}`"}
|
||||
# Link URLs preceded by space or newline (not already linked)
|
||||
|
Loading…
Reference in New Issue
Block a user