Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15402846
D9404.id22445.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9404.id22445.diff
View Options
diff --git a/src/lexer/PhutilPythonFragmentLexer.php b/src/lexer/PhutilPythonFragmentLexer.php
--- a/src/lexer/PhutilPythonFragmentLexer.php
+++ b/src/lexer/PhutilPythonFragmentLexer.php
@@ -195,6 +195,10 @@
),
);
+ $nl = array(
+ array('\\n', 's'),
+ );
+
$strings = array(
array(
'%(\\(\\w+\\))?[-#0 +]*([0-9]+|[*])?(\\.([0-9]+|[*]))?'.
@@ -207,31 +211,28 @@
// unhandled string formatting sign
array('%', 's'),
// newlines are an error (use $nl rules)
- );
-
- $nl = array(
- array('\\n', 's'),
+ array('', null, '!pop'),
);
$dqs = array_merge(array(
array('"', 's', '!pop'),
// included here for raw strings
- array('(?:\\\\\\\\|\\\\\'|\\\\n)', 's', '!pop'),
+ array('(?:\\\\\\\\|\\\\\'|\\\\n)', 's'),
), $strings);
$sqs = array_merge(array(
array('\'', 's', '!pop'),
// included here for raw strings
- array('(?:\\\\\\\\|\\\\\'|\\\\n)', 's', '!pop'),
+ array('(?:\\\\\\\\|\\\\\'|\\\\n)', 's'),
), $strings);
$tdqs = array_merge(array(
array('"""', 's', '!pop'),
- ), $strings, $nl);
+ ), $nl, $strings);
$tsqs = array_merge(array(
array('\'\'\'', 's', '!pop'),
- ), $strings, $nl);
+ ), $nl, $strings);
return array(
'start' => array_merge(array(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 12:37 AM (4 d, 13 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7227157
Default Alt Text
D9404.id22445.diff (1 KB)
Attached To
Mode
D9404: Fix bugs in python lexer
Attached
Detach File
Event Timeline
Log In to Comment