Skip to content

Commit

Permalink
Fix recognising "return" as function call (closes #26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Nov 27, 2023
1 parent 5dcc31b commit e0fe590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/theme/pluto.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Prism.languages.pluto = {
'comment': /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
'function': /\b(?!in\s)(?!\d)\w+(?=\s*(?:[({"]))/,
'function': /\b(?!in\s)(?!\d)(?!return)\w+(?=\s*(?:[({"]))/,
'string': {
pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
greedy: true
Expand Down

0 comments on commit e0fe590

Please sign in to comment.