fix(prompt): escape the backslash in the [^\\W] node-id rule (for #4799)
#4799's new wording put `[^\W]` in the non-raw _EXTRACTION_SYSTEM string, which raises SyntaxWarning: invalid escape sequence '\W' (a SyntaxError in a future Python). Escape it to `[^\\W]`; the rendered runtime prompt is byte-identical (`[^\W]`) and the markdown fragments are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
8dd649952c
commit
6667a491e8
1 file changed
+1
-1
+1
-1
@@ -552,7 +552,7 @@ solely for such a cross-document reference. Never add this marker to a node
|
||||
defined by the enclosing source. Never invent, shorten or rewrite a path, and
|
||||
never omit source_file.
|
||||
|
||||
Node ID format: lowercase, word characters only (`[^\W]` after casefolding, i.e. `[a-z0-9_]` for ASCII input but non-ASCII letters and digits are kept as-is), no dots or slashes.
|
||||
Node ID format: lowercase, word characters only (`[^\\W]` after casefolding, i.e. `[a-z0-9_]` for ASCII input but non-ASCII letters and digits are kept as-is), no dots or slashes.
|
||||
Format: {stem}_{entity} where stem = full repo-relative path with the extension dropped, every segment joined with _ (e.g. src/auth/session.py -> src_auth_session); entity = symbol name (both normalised). Top-level files use just the filename stem (setup.py -> setup).
|
||||
|
||||
Edge direction rule — source is always the ACTOR, target is the ACTED-UPON:
|
||||
|
||||
Reference in new issue
Block a user