mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
Fix "this is not available in \1" messages in reference
This commit is contained in:
parent
85c48379f3
commit
5f0b776748
@ -400,14 +400,14 @@ for jsondata in detail:
|
||||
dprefix = "This is only available in ";
|
||||
if re.match(r'^!defined\((.+?)\) && !defined\((.+?)\)$', d):
|
||||
dprefix = "This is not available in ";
|
||||
d = re.sub(r'^!defined\((.+?)\) && !defined\((.+?)\)$', r"defined(\\1) or defined(\\2)", d)
|
||||
d = re.sub(r'^!defined\((.+?)\) && !defined\((.+?)\)$', r"defined(\1) or defined(\2)", d)
|
||||
if re.match(r'^!defined\((.+?)\)$', d):
|
||||
dprefix = "This is not available in ";
|
||||
d = re.sub(r'^!defined\((.+?)\)$', r"defined(\\1)", d)
|
||||
d = re.sub(r'^!defined\((.+?)\)$', r"defined(\1)", d)
|
||||
d = re.sub(r'!defined\(', r"not defined(", d)
|
||||
d = d.replace("||", " and ").replace("&&", " with ")
|
||||
d = re.sub(r'defined\((.+?)\)', replace_with_ifdef_description, d)
|
||||
d = re.sub(r'(.*)_COUNT>=(.*)', r"devices with more than \\2 \\1 peripherals", d)
|
||||
d = re.sub(r'(.*)_COUNT>=(.*)', r"devices with more than \2 \1 peripherals", d)
|
||||
desc.append("\n\n**Note:** "+dprefix+d);
|
||||
html_description(desc, jsondata["name"])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user