Skip to content

Commit 8ecef30

Browse files
authoredDec 2, 2021
Python: Made comment greedy (#3249)
1 parent 18c9204 commit 8ecef30

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎components/prism-python.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Prism.languages.python = {
22
'comment': {
33
pattern: /(^|[^\\])#.*/,
4-
lookbehind: true
4+
lookbehind: true,
5+
greedy: true
56
},
67
'string-interpolation': {
78
pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,

‎components/prism-python.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.