hungtcs / mxgraph-type-definitions

mxgraph type definitions
https://www.npmjs.com/package/mxgraph-type-definitions
Apache License 2.0
22 stars 8 forks source link

some helper regexps #9

Closed hungtcs closed 4 years ago

hungtcs commented 4 years ago

Hi @tbouffard ! I modified from the source code, I think you too. Here are some of my regular expressions, it's very helpful.

I am using vscode, I don't known it works for other editors. Please note the spaces

replace from <> to <>

for default value

 Default is (.+)\.
 \n * @default $1`

for class

Class: (.+)
@class $1

for boolean variables

 = (true|false);
 : boolean;

for links, do not replace all, conflict with array

<(\w+(\.|\w+)*)>
{@link $1}

for params

 (\w+) -
 @param $1

replace to blank

\n \* Variable: .+\n \*
\n \* Function: .+\n \*
\n \* Parameters:\n \*
 = function
tbouffard commented 4 years ago

Thanks for the tips. This may also interest other people, so if you have time, it will be nice to have this directly in the README.

Yes, I am also modifying from the source code. I am currently using IntelliJ but I will give a try to your regexp helpers on VSCode as well. I am done for today, I will check this later on this week.