-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Problem
Hello,
First, thank you for this excellent project! I've found a potential bug or a mismatch between the documentation and the implementation of the file inclusion anchor feature.
The documentation states that an anchor is a "pair of matching lines" that must begin with ANCHOR: name and end with ANCHOR_END: name. This implies that the ANCHOR_END tag is required to correctly close a named block.
However, in my testing, the parsing logic does not seem to distinguish between ANCHOR: name and ANCHOR_END: name. Using a second starting anchor tag (/* ANCHOR: all /) seems to close the block in the same way an end tag (/ ANCHOR_END: all */) does.
Steps
- According to the documentation, this is the expected structure, and it works correctly:
/* ANCHOR: all */
struct Paddle {
hello: f32,
}
/* ANCHOR_END: all */
- However, the following example, which incorrectly uses a starting ANCHOR tag at the end, produces the exact same output:
/* ANCHOR: all */
struct Paddle {
hello: f32,
}
/* ANCHOR: all */
Possible Solution(s)
This could be either a bug in the parsing logic or an area where the documentation could be updated to clarify this behavior.
Thank you for your time and consideration!
Notes
No response
Version