History

docs: kdoc: Fix pdfdocs build for tools

the "\1" inside a docstring requires proper scaping to not be considered a hex character and break the build.

Mauro Carvalho Chehab committed 9 months ago

Commit 98f51c41 parent 12ea2cf1 file · +7 −3Browse files

Showing the changes to tools/lib/python (1 of 1 file). Show all

Unified · Split

tools/lib/python/kdoc/kdoc_re.py+7−3
@@ -228,14 +228,18 @@ class NestedMatch: · 227 unmodified lines
228 yield line[t[0]:t[2]]228 yield line[t[0]:t[2]]
229 229
230 def sub(self, regex, sub, line, count=0):230 def sub(self, regex, sub, line, count=0):
231 """231 r"""
232 This is similar to re.sub:232 This is similar to re.sub:
233 233
234 It matches a regex that it is followed by a delimiter,234 It matches a regex that it is followed by a delimiter,
235 replacing occurrences only if all delimiters are paired.235 replacing occurrences only if all delimiters are paired.
236 236
237 if r'\1' is used, it works just like re: it places there the237 if the sub argument contains::
238 matched paired data with the delimiter stripped.238
239 r'\1'
240
241 it will work just like re: it places there the matched paired data
242 with the delimiter stripped.
239 243
240 If count is different than zero, it will replace at most count244 If count is different than zero, it will replace at most count
241 items.245 items.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t