Repository navigation
Conversation
The include directive is a very important directive for large documentation projects. The include now allows nested includes and makes sure the headers are working as expected in the parser context. Which means that headers from includes become part of the parent document, at the level they were include.
jaapio
commented
Oct 28, 2026
| { | ||
| public function __construct( | ||
| private readonly DocumentRule $startingRule, | ||
| private readonly CodeNodeOptionMapper $codeNodeOptionMapper, |
jaapio
commented
Oct 28, 2026
| use function str_contains; | ||
| use function trim; | ||
|
|
||
| final class IncludeLineSelector |
Member
Author
There was a problem hiding this comment.
add unit tests, and improve this code.
jaapio
commented
Oct 28, 2026
|
|
||
| public function __construct( | ||
| private readonly CodeNodeOptionMapper $codeNodeOptionMapper, | ||
| private readonly IncludeLineSelector $lineSelector, |
jaapio
commented
Oct 28, 2026
| <h1>Subpage</h1> | ||
| <img | ||
| src="/subfolder/hero2.svg" | ||
| src="/other-parts/hero2.svg" |
Member
Author
There was a problem hiding this comment.
validate with sphinx, is this correct?
Member
Author
There was a problem hiding this comment.
Sphinx does copy the files to _images, so this is different. @linawolf do you see an issue in this change? The files are now stored in the same path as they are in the source directory, before we copied them to the target directory.
If you do an include multiple times this would result in multiple times the same image.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The include directive is a very important directive for large documentation projects. The include now allows nested includes and makes sure the headers are working as expected in the parser context. Which means that headers from includes become part of the parent document, at the level they were include.