Skip to content

Commit

Permalink
do not split C/C++ variable names of the form |[[:alnum:]_]+
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Jun 12, 2018
1 parent 85f145a commit 6ec2509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meta/TextFormatting.m
Expand Up @@ -114,7 +114,7 @@
ProtectCTokens[line_String] :=
DeleteCases[StringSplit[
line,
s:RegularExpression["\".*?(?<!\\\\)\"|##|<:|:>|<%|%>|(%:){1,2}|[0-9]+\\.[0-9]*|\\.\\.\\.|::|\\.\\*|[-+*/%&|^]=|(<<|>>)=?|[=!<>]=|&&|\\|\\||\\+\\+|--|->\\*?"]
s:RegularExpression["\".*?(?<!\\\\)\"|##|<:|:>|<%|%>|(%:){1,2}|[0-9]+\\.[0-9]*|[[:alnum:]_]+|\\.\\.\\.|::|\\.\\*|[-+*/%&|^]=|(<<|>>)=?|[=!<>]=|&&|\\|\\||\\+\\+|--|->\\*?"]
:> Hold[s]], ""];

SplitLine[fstLen_Integer, strs_List] :=
Expand Down

0 comments on commit 6ec2509

Please sign in to comment.