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

feat: support escaping @ in the comment #351

Merged
merged 1 commit into from
Nov 15, 2024
Merged

feat: support escaping @ in the comment #351

merged 1 commit into from
Nov 15, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Nov 15, 2024

If we use # @ but @.. is not a valid comment tag, argc will throw an error.

# @describe Patch utils
# 
# Here is an example of a patch block:
# --- a/hello.py
# +++ b/hello.py
# @@ ... @@
#  def hello():
# -    print("Hello World")
# +    name = input("What is your name? ")
# +    print(f"Hello {name}")

eval "$(argc --argc-eval "$0" "$@")"
@@(line 8) is unknown tag

This PR allow escaping @ with \ to avoid such error.

-# @@ ... @@
+# \@@ ... @@

@sigoden sigoden changed the title feat: support escape @ in the comment feat: support escaping @ in the comment Nov 15, 2024
@sigoden sigoden merged commit 5c89c51 into main Nov 15, 2024
4 checks passed
@sigoden sigoden deleted the feat branch November 15, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant