weaverryan/symfony-docs

refs & includes being parsed as files

weaverryan opened this issue · 0 comments

The parser currently adds all :ref:, :doc and *.rst.inc to the parse queue.

That's why this line exists: https://github.com/doctrine/rst-parser/blob/master/lib/Builder.php#L358

This should raise an error instead, because a file added in the parser that could not
be found means something goes wrong. However, this currently can't be done because too many things are being included: the parser sees all dependencies (doc, ref or include) as equivalent.

  • :doc should be treated like currently: these files should be added to the parser queue
  • :ref should not be added to the parser queue ever
  • include should somehow be "inlined" - not added to the parser queue