Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff includes don't always work reliably #66

Closed
NathanLovato opened this issue Oct 28, 2024 · 1 comment
Closed

Diff includes don't always work reliably #66

NathanLovato opened this issue Oct 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@NathanLovato
Copy link
Contributor

NathanLovato commented Oct 28, 2024

We use a leading + or - sign on an include line to indicate that an included code block should have + or - signs prefixed to each line, for diff display.

In this example the fourth include fails and includes the entire file, ignoring the anchor attribute:

<Include file="bouncer.gd" anchor="physics_process_signature"/>
-<Include file="07_runner.gd" anchor="direction_calculation"/>
+<Include file="bouncer.gd" anchor="direction"/>
<Include file="bouncer.gd" anchor="desired_velocity"/>

On top of fixing this, we may consider making the diff aspect an attribute, like diff="+", as suggested by Jad, instead of prepending the prefix in the line, for parsing and writing consistency. This would be part of #65

@NathanLovato NathanLovato changed the title Diff includes don' Diff includes don't always work reliably Oct 28, 2024
@NathanLovato NathanLovato added the bug Something isn't working label Oct 28, 2024
@NathanLovato
Copy link
Contributor Author

The bug was something else; if an anchor is missing an END marker, the parser includes the entire file's content. Opening a separate ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant