TW 5.1.15 uses highlight.js for syntax highlithing
The highlight.js contains some javascript files for language syntax highlighting.
Some of them have bugs. My question here is for Fortran syntax highlighting the numbers are like these
5
5.23
5.23e2
5.23d2
5.23_wp
So the number format (integer, float and user defined precision) is like below:
0-9
.
de
DE
number_followed by chars (like 5.23_wp, 12_ip, 14.33e5_kp, etc)
In [$:/plugins/tiddlywiki/highlight/highlight.js] tiddler the number class is defined as below
{ className: 'number',
begin: '(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?',
relevance: 0 }
|
which is not correct (cannot recognize number like 2.34_wp)
What is the correct regexp format for these numbers?
Sorry, if the question is not directly related to TW!
Best
Mohammad |