According to me, what you are doing would take a lot of time. So, I suggest that you install a different plugin:
It has better features and supports more languages and in a better way. So, it would remove all these problems.
EDIT:
Hey, I tried out the same code with latest version and got following result-
EDIT:
So, if you don't want to use another plugin, then I'll tell you about the coding:
First open \wp-content\plugins\wp-geshi-highlight\geshi\geshi\tsql.php in your text editor.
Then, locate the array 'KEYWORDS'
or search for it.
Add 6
to the last of it (after 5
) and add your custom keywords in it. For example:
5 => array(
'ALL', 'AND', 'ANY', 'BETWEEN', 'CROSS', 'EXISTS', 'IN', 'JOIN', 'LIKE', 'NOT', 'NULL',
'OR', 'OUTER', 'SOME',
),
6 => array( //This line has been added by me
'status' //This line has been added by me
) //This line has been added by me
Note: I have just shown array element 5 (already present) and array element 6 (which I have made).
Then, to make it case-sensitive add below code to the last of 'CASE_SENSITIVE'
array:
6 => true
The 'CASE_SENSITIVE'
array should look like this:
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
4 => false,
5 => false,
6 => true //This line has been added by me
),
Now, you will have to add styling to the custom keywords. This can be achieved by adding below line to the 'KEYWORDS'
element of 'STYLES'
array. The starting of 'STYLES'
array should look like this:
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0000FF;',
2 => 'color: #FF00FF;',
3 => 'color: #AF0000;',
4 => 'color: #AF0000;',
5 => 'color: #808080;',
6 => 'color: #0000FF;' //This line has been added by me
),
You can solve your problems by above guidelines, but for the part in which the plugin highlights incomplete words, I have found only one solution, that you update your plugin to latest version, because it solves this problem.