We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1e9b41 commit 56df23bCopy full SHA for 56df23b
1 file changed
netjsonconfig/backends/openwrt/renderer.py
@@ -1,3 +1,5 @@
1
+import re
2
+
3
from ..base.renderer import BaseRenderer
4
5
@@ -16,8 +18,7 @@ def cleanup(self, output):
16
18
.replace("\noption", "\n\toption")
17
19
.replace("\nlist", "\n\tlist")
20
)
- import re
- # convert 'True' to '1' and 'False' to '0', but only on whole words bounded by quotes e.g. 'True' -> '1'
21
+ # convert True to 1 and False to 0 (exact match only, not substrings)
22
output = re.sub(r"'True'", "'1'", output)
23
output = re.sub(r"'False'", "'0'", output)
24
# max 2 consecutive \n delimiters
0 commit comments