acinfo64 wrote:I guess it's not possible to make a counter in a wordfile and display it's value instead of the = signs.
That's correct. The function list just displays what was found by the regular expressions defined in the wordfile. It is not possible to modify the found strings before getting them displayed in the function list.
acinfo64 wrote:The "== Titles and subtitles ==" in the example doesn't collapse. I don't see why but it has something to do with the text below the "This looks like:". Which in practice doesn't occur.
Code folding is offered always from line with a fold string to next line with an unfold string
IF there is at least 1 line between.
On the heading example block
Code: Select all
= This is a major title =
== This is a normal title ==
=== This is a subtitle ===
==== This is four equals signs ====
===== This is five equals signs =====
====== This is six equals signs ======
just the last line is offered to fold for that reason.
Important: Code folding does not work like brace matching. The order and the number of unfold strings does not refer to order and number of fold strings. So the code folding for MediaWiki files is always from a heading to next heading independent on level of heading.
But the reason for no folding offered on line with
== Titles and subtitles == is caused by
Code: Select all
/Open Comment Fold Strings = "= "
/Close Comment Fold Strings = "= "
When an equal sign and a space is found
AFTER line comment starting string which is just an equal sign, then consider this line for code folding. But on lines for heading 1 like on
= This is a major title = there is just a space character after the single equal sign being interpreted as start of the comment and that causes the not expected code folding on
== Titles and subtitles ==.
The solution is simple.
Space and equal sign must be exchanged in the open/close comment fold strings:
Code: Select all
/Open Comment Fold Strings = " ="
/Close Comment Fold Strings = " ="
The end of a heading is definitely always
AFTER line comment starting string, i.e. after the equal sign in first column.
acinfo64 wrote:It would be nice, if a line starts with a space, that then all text behind that space, on the same line, will have a different color (something like gray close to white). That's RAW text and used very often. The text after the space (on same line) is not formatted anymore.
Well, the first line could be changed to
Code: Select all
/L20"MediaWiki" Noquote Line Comment Num = 1 Line Comment Valid Columns = [1] Line Comment Alt = = Line Comment Valid Columns Alt = [1] Block Comment On Alt = [[ Block Comment Off Alt = ]] File Extensions = WIKI
Note: There are 2 spaces after
Line Comment Num = 1.
Only line comments definitions can be combined with a position information. But line comment, alternate line comment and block comment are highlighted all with same color/style settings. So headings and preformatted text are syntax highlighted with same color/style in the file with using above definition.
And now every
" =" within a preformatted text block would be also interpreted as open/close comment fold string which would be definitely not good. Therefore I suggest not making use of such a definition. Let the block displayed finally as preformatted text being displayed not syntax highlighted in UltraEdit.
I agree that it would be really useful to have raw text displayed with a different color in text editor, but this is currently with UE v23.20 not really possible without bad effects for other parts of the syntax highlighting. Syntax highlighting of UltraEdit has currently not enough capabilities for column or context dependent syntax highlighting because not needed for most programming and scripting languages for which syntax highlighting is primary designed for.
acinfo64 wrote:Is it possible to give the top level chapter (e.g. = Chapter 1 =) a different color?
No because all lines starting with an equal sign are line comments. It is impossible to get heading 1 highlighted different to all other headings.
It would be possible if there would be separate color/style settings for line comment and alternate line comment and raw text is not highlighted as comment, but this is unfortunately not the case.
acinfo64 wrote:I think it would be nice if the bold/italic text will be colored also, instead of only the markers (''').
Code: Select all
...
/Marker Characters = "<>[]''"
...
/C8"Single quotes"
' ''
...
results in getting highlighted with color group 8 everything between 1 single quote, 3 single quotes, 5 single quotes, 7 single quotes, but only on same line as marker characters don't work across multiple lines in file.
Document formatting defined with a sequence of characters like used for MediaWiki, DokuWiki or Markdown can be processed only with special code using IF - ELSE IF - ELSE IF conditions. For example:
IF there is a ' AND next character is NOT ' THEN ignore
ELSE IF the next but one is NOT ' THEN display italic
ELSE IF the next but two is NOT ' THEN display bold
ELSE IF next 4 are all ' THEN display bold+italic.
Such markups can't be correct interpreted with the syntax highlighting capabilities of UltraEdit v23.20.
Also it is not possible that multiple highlighting definitions are applied on same string. For example if above definition is used to get everything within a line enclosed in 1 or 3 or 5 single quotes highlighted with settings for color group 8 like finally bold displayed text, it is not possible to highlight tags like
<nowiki> within the string displayed finally bold with a different color.
Syntax highlighting is for highlighting the syntax and not for getting a plain text file displayed like a document after processing by an application. In my point of view it is much more important to see the special characters and the tags highlighted which define the final formatting on editing a MediaWiki file in the text editor to see possible mistakes on those format specifying character sequences than getting the text file in text editor already displayed like it will be displayed finally after being interpreted by MediaWiki processor converting the text file to an HTML file and being parsed by a browser.
Best would be to get
'' and
''' and
''''' highlighted with 3 different colors and all other sequences of single quotes are displayed in UltraEdit as normal text. But this would require that the single quote character is not defined as word delimiter. But this is necessary as a sequence of single quotes can and must often exist immediately before or after a real word in a human language context and therefore the single quote character must be a word delimiter.