Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support dollar-prefixed and multi-quote raw string literals in C##3129

Open
Trung6405 wants to merge 2 commits into
pygments:masterfrom
Trung6405:fix/rawstring-dollar-rendering
Open

Support dollar-prefixed and multi-quote raw string literals in C##3129
Trung6405 wants to merge 2 commits into
pygments:masterfrom
Trung6405:fix/rawstring-dollar-rendering

Conversation

@Trung6405

Copy link
Copy Markdown

Summary

Improves C# raw string literal handling in the CSharpLexer.

Previously, raw strings such as:

public string A = """
$
""";

would incorrectly tokenize $ as Token.Error.

Changes

  • Added support for C# raw string literals
  • Added handling for dollar-prefixed raw strings
  • Added handling for multi-quote raw string delimiters
  • Added regression tests for raw string tokenization

Result

Content inside raw string literals is now correctly tokenized as Literal.String, including $ characters in interpolated raw string forms.

Fixes #2897

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.

C#: Rendering $ in Rawstring

1 participant