better handle indentation when rendering source code #19293
Labels
autodoc
The web application for interactive documentation and generation of its assets.
bug
Observed behavior contradicts documented or intended behavior
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
Milestone
Extracted from #19249.
Example
Instead it should render like this:
This happens because it is rendering only the function declaration directly from the file, which in fact is indented two levels. The rendering function needs to detect this and chop off the indentation levels.
Some Examples
Case 1
Input:
Expected Output:
Case 2
Input:
Expected Output:
Case 3
Input:
Expected Output:
Case 4
Input:
Expected Output:
Note that those last two cases are planned to become syntax errors:
The text was updated successfully, but these errors were encountered: