-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix backtracking issues, add string interpolation in Perl lexer (#1161)
The previous rules for strings used a regular expression that combined different elements of the string. This could, in a pathological case, cause Rouge to get stuck trying to lex the code. This problem can be fixed by lexing a quoted string in a separate state to `:root`. In addition to adding states for quoted string, this commit also adds support for basic string interpolation. The basic code is lifted from the Ruby lexer. This fixes #974.
- Loading branch information
Showing
2 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters