docs: automarkup.py: Fix regexes to solve sphinx 3 warnings
authorNícolas F. R. A. Prado <nfraprado@protonmail.com>
Tue, 13 Oct 2020 23:13:17 +0000 (23:13 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 15 Oct 2020 05:49:38 +0000 (07:49 +0200)
commitf66e47f98c1e827a85654a8cfa1ba539bb381a1b
treec53095ea23d2ecb9007b4f3cdbfa60e7f54c576d
parent06dc65b0fa6130aae73927399269bdea1b7658d8
docs: automarkup.py: Fix regexes to solve sphinx 3 warnings

With the transition to Sphinx 3, new warnings were generated by
automarkup, exposing bugs in the regexes.

The warnings were caused by the expressions matching words in the
translated versions of the documentation, since any unicode character
was matched.

Fix the regular expression by making the C regexes use ASCII and
ensuring the expressions only match the beginning of words,
in order to avoid warnings like this:

WARNING: Unparseable C cross-reference: '调用debugfs_rename'

That's probably due to the lack of using spaces between words
on Chinese.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Documentation/sphinx/automarkup.py