mirror of https://github.com/torvalds/linux.git
As reported by Donald, this code:
rst_parser = RSTParser()
rst_parser.parse('\n'.join(result), document)
breaks line parsing. As an alternative, I tested a variant of it:
rst_parser.parse(result, document)
but still line number was not preserved. As Donald noted,
standard Parser classes don't have a direct mechanism to preserve
line numbers from ViewList().
So, instead, let's use a mechanism similar to what we do already at
kerneldoc.py: call the statemachine mechanism directly there.
I double-checked when states and statemachine were introduced:
both were back in 2002. I also tested doc build with docutils 0.16
and 0.21.2. It worked with both, so it seems to be stable enough
for our needs.
Reported-by: Donald Hunter <donald.hunter@gmail.com>
Closes: https://lore.kernel.org/linux-doc/m24ivk78ng.fsf@gmail.com/T/#u
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
||
|---|---|---|
| .. | ||
| templates | ||
| automarkup.py | ||
| cdomain.py | ||
| kernel_abi.py | ||
| kernel_feat.py | ||
| kernel_include.py | ||
| kerneldoc-preamble.sty | ||
| kerneldoc.py | ||
| kfigure.py | ||
| load_config.py | ||
| maintainers_include.py | ||
| min_requirements.txt | ||
| parallel-wrapper.sh | ||
| parse-headers.pl | ||
| parser_yaml.py | ||
| requirements.txt | ||
| rstFlatTable.py | ||
| translations.py | ||