-
I have 2 pieces of code, one in Python, one in Scala, in Browser. Q.1 Q.2 So I did the following: const obj_CodeSyntaxHighlight_general_extra = {
'function': {
pattern: /\w+(?=\()/,
},
}
Object.assign(Prism.languages.python, obj_CodeSyntaxHighlight_general_extra);
Object.assign(Prism.languages.scala, obj_CodeSyntaxHighlight_general_extra);
Prism.highlightAll(); And this is the result: As you can see, ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I dont have deep knowledge with PrismJs. And found the following: delete Prism.languages.scala['class-name'];
delete Prism.languages.scala['function'];
delete Prism.languages.scala['constant']; I commented out these lines, and the Scala function code syntax highlight works. Dont know why these lines are there. |
Beta Was this translation helpful? Give feedback.
I dont have deep knowledge with PrismJs.
But I check the source code again today.
And found the following:
I commented out these lines, and the Scala function code syntax highlight works.
Dont know why these lines are there.