[PATCH v2 22/28] docs: c_lex: don't exclude an extra token

Mauro Carvalho Chehab posted 28 patches 3 weeks, 4 days ago
There is a newer version of this series
[PATCH v2 22/28] docs: c_lex: don't exclude an extra token
Posted by Mauro Carvalho Chehab 3 weeks, 4 days ago
On simple match, replace only the match and following spaces.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 tools/lib/python/kdoc/c_lex.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/lib/python/kdoc/c_lex.py b/tools/lib/python/kdoc/c_lex.py
index a61f5fe88363..bc70b55f0dbe 100644
--- a/tools/lib/python/kdoc/c_lex.py
+++ b/tools/lib/python/kdoc/c_lex.py
@@ -486,6 +486,8 @@ class CMatch:
                     continue
                 else:
                     # Name only token without BEGIN/END
+                    if i > start:
+                        i -= 1
                     yield start, i
                     start = None
 
-- 
2.52.0