Skip to content

Commit

Permalink
Merge pull request #14892 from omoerbeek/rec-docs-runtime-quoting
Browse files Browse the repository at this point in the history
rec: fix quoting issue in #14886
  • Loading branch information
omoerbeek authored Dec 2, 2024
2 parents 57b511c + f1bd341 commit 85dfaa0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
17 changes: 10 additions & 7 deletions pdns/recursordist/settings/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,12 @@ def gen_oldstyle_docs(srcdir, entries):
runtime = entry['runtime']
if not isinstance(runtime, list):
runtime = [runtime]
for k,v in enumerate(runtime):
runtime[k] = '``' + runtime[k] + '``'
li = []
for v in runtime:
if v == 'reload-yaml':
continue
file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in runtime)}\n\n")
li.append('``' + v + '``')
file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in li)}\n\n")
file.write(entry['doc'].strip())
file.write('\n\n')

Expand Down Expand Up @@ -772,11 +773,13 @@ def gen_newstyle_docs(srcdir, argentries):
runtime = entry['runtime']
if not isinstance(runtime, list):
runtime = [runtime]
for k,v in enumerate(runtime):
runtime[k] = '``' + runtime[k] + '``'
li = []
for v in runtime:
vv = '``' + v + '``'
if v == 'reload-yaml':
runtime[k] = 'since 5.2.0: ' + runtime[k]
file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in runtime)}\n\n")
vv = 'since 5.2.0: ' + vv
li.append(vv)
file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in li)}\n\n")
if 'doc-new' in entry:
file.write(fixxrefs(entries, entry['doc-new'].strip()))
else:
Expand Down
7 changes: 4 additions & 3 deletions pdns/recursordist/settings/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@
'help' : 'If we should never cache IPv4 ECS responses',
'doc' : '''
When set, never cache replies carrying EDNS IPv4 Client Subnet scope in the record cache.
In this case the decision made by ```ecs-ipv4-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant.
In this case the decision made by ``ecs-ipv4-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant.
''',
'versionadded': '4.5.0'
},
Expand All @@ -805,7 +805,7 @@
'help' : 'If we should never cache IPv6 ECS responses',
'doc' : '''
When set, never cache replies carrying EDNS IPv6 Client Subnet scope in the record cache.
In this case the decision made by ```ecs-ipv6-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant.
In this case the decision made by ``ecs-ipv6-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant.
''',
'versionadded': '4.5.0'
},
Expand Down Expand Up @@ -3388,7 +3388,7 @@
''',
'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`',
'versionadded': '5.1.0',
'runtime': ['add-nta', 'clear-nta'],
'runtime': ['add-nta', 'clear-nta', 'reload-lua-config', 'reload-yaml'],
},
{
'name' : 'trustanchorfile',
Expand All @@ -3402,6 +3402,7 @@
''',
'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`',
'versionadded': '5.1.0',
'runtime': ['reload-lua-config', 'reload-yaml'],
},
{
'name' : 'trustanchorfile_interval',
Expand Down

0 comments on commit 85dfaa0

Please sign in to comment.