diff --git a/autotests/html/csharp.cs.html b/autotests/html/csharp.cs.html --- a/autotests/html/csharp.cs.html +++ b/autotests/html/csharp.cs.html @@ -16,7 +16,7 @@ * NOTE ### FIXME TODO */ -/** this is another +/** this is another * multiline comment * NOTE ### FIXME TODO */ diff --git a/autotests/html/highlight.hs.html b/autotests/html/highlight.hs.html --- a/autotests/html/highlight.hs.html +++ b/autotests/html/highlight.hs.html @@ -4,87 +4,87 @@
--- test file for Haskell syntax highlighting in KDE's Kate +-- test file for Haskell syntax highlighting in KDE's Kate --- The test file for literate Haskell can be easily created like this: --- cat highlight.hs | sed -e "s|^|> |" -e "s|> -- ||" -e "s|^> $||" > highlight.lhs --- You only have to manually edit the multi-line comment below. +-- The test file for literate Haskell can be easily created like this: +-- cat highlight.hs | sed -e "s|^|> |" -e "s|> -- ||" -e "s|^> $||" > highlight.lhs +-- You only have to manually edit the multi-line comment below. --- this is a single-line comment +-- this is a single-line comment -{- this is a multi-line comment +{- this is a multi-line comment Things like "a string" or a 'c' character shouldn't be highlighted in here. -- I could even start a new -- one-line comment. -} --- a data definition +-- a data definition data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) --- function definition, "funnyfunction::", "Integer", "Int", "Bool" should be highlighted +-- function definition, "funnyfunction::", "Integer", "Int", "Bool" should be highlighted funnyfunction::(Tree a)=>[a]->Integer->Int->Bool --- strings and chars --- first line of function definitions (type declaration) should be highlighted +-- strings and chars +-- first line of function definitions (type declaration) should be highlighted strangefunction::Int->String strangefunction 1 = "hello" strangefunction 2 = "what's up" strangefunction 3 = (strangefunction 1) ++ ", " ++ (strangefunction 2) -strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" +strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" strangefunction 5 = '\n':[] strangefunction 6 = '\invalidhaskell':[] --- function name including the single quote character --- and infix operator (`div`) +-- function name including the single quote character +-- and infix operator (`div`) justtesting'::Int->Int justtesting' 2 = 2+1 justtesting' 9 = 7 `div` 2 --- same definition as above, slightly different function name and a couple more whitespaces +-- same definition as above, slightly different function name and a couple more whitespaces justtesting'' :: Int -> Int justtesting'' 2 = 3 justtesting'' 9 = 3 + 9 - 9 --- the following lines are copied out of Haskell's "Prelude.hs" +-- the following lines are copied out of Haskell's "Prelude.hs" infixl 7 *, /, `quot`, `rem`, `div`, `mod`, :%, % --- everything highlighted except the "a" +-- everything highlighted except the "a" class Bounded a where minBound, maxBound :: a class (Num a, Ord a) => Real a where toRational :: a -> Rational --- finally, some keyword lists +-- finally, some keyword lists --- keywords +-- keywords case, class, data, deriving, do, else, family, forall, if, in, infixl, infixr, instance, let, module, of, pattern, primitive, then, type, where --- infix operators +-- infix operators quot, rem, div, mod, elem, notElem, seq --- this stuff is not handled yet +-- this stuff is not handled yet !!, %, &&, $!, $, *, **, -,., /=, <, <=, =<<, ==, >, >=, >>, >>=, ^, ^^, ++, || --- functions +-- functions abs, acos, acosh, all, and, any, appendFile, approxRational, asTypeOf, asin, asinh, atan, atan2, atanh, basicIORun, @@ -116,29 +116,29 @@ undefined, unlines, until, unwords, unzip, unzip3, userError, words, writeFile, zip, zip3, zipWith, zipWith3 --- type constructors +-- type constructors Bool, Char, Double, Either, FilePath, Float, IO, IOError, Integer, Int, Maybe, Ordering, Rational, Ratio, ReadS, ShowS, String --- classes +-- classes Bounded, Enum, Eq, Floating, Fractional, Functor, Integral, Ix, Monad, Num, Ord, Read, RealFloat, RealFrac, Real, Show --- data constructors +-- data constructors EQ, False, GT, Just, LT, Left, Nothing, Right, True --- promoted data constructors +-- promoted data constructors 'True --- pragma with compiler flags +-- pragma with compiler flags {-# OPTIONS_GHC -fno-warn-orphans #-} --- multiline pragma with language extensions +-- multiline pragma with language extensions {-# LANGUAGE OverlappingInstances, BangPatterns diff --git a/autotests/html/highlight.cmake.html b/autotests/html/highlight.cmake.html --- a/autotests/html/highlight.cmake.html +++ b/autotests/html/highlight.cmake.html @@ -71,7 +71,7 @@ ) #[=======================================================================[.rst: -.. cmake:command:: my_fun +.. cmake:command:: my_fun *RST* documentation ``can`` refer to :cmake:command:`any_commands` or :cmake:variable:`variables`... (but this require updated RST higlighter ;-) diff --git a/autotests/html/highlight.cpp.html b/autotests/html/highlight.cpp.html --- a/autotests/html/highlight.cpp.html +++ b/autotests/html/highlight.cpp.html @@ -489,7 +489,7 @@ //END region // \brief blah blah -/// \brief blah blah +/// \brief blah blah /** * Doxygen diff --git a/autotests/html/highlight.css.html b/autotests/html/highlight.css.html --- a/autotests/html/highlight.css.html +++ b/autotests/html/highlight.css.html @@ -15,7 +15,7 @@ font-family: Verdana, Helvetica, "Bitstream Vera Sans", sans-serif; margin-top: 0px; /* yet another comment */ margin-bottom: 0px; - // this is no comment, it's just broken! + // this is no comment, it's just broken! margin-left: 0px; margin-right: 0px; } diff --git a/autotests/html/highlight.dox.html b/autotests/html/highlight.dox.html --- a/autotests/html/highlight.dox.html +++ b/autotests/html/highlight.dox.html @@ -8,19 +8,19 @@ Normal text, no HL. =================== -a multiline comment may begin with a /*! */, too. That should work, +a multiline comment may begin with a /*! */, too. That should work, because it is the same "entrance rule". popping tests: -/** multiline */ end of doxygen HL mode -/*! multiline */ end of doxygen HL mode -//! singleline, where */ should be ignored! still doxygen HL mode -/// singleline, where */ should be ignored! still doxygen HL mode -///< singleline, where */ should be ignored! still doxygen HL mode +/** multiline */ end of doxygen HL mode +/*! multiline */ end of doxygen HL mode +//! singleline, where */ should be ignored! still doxygen HL mode +/// singleline, where */ should be ignored! still doxygen HL mode +///< singleline, where */ should be ignored! still doxygen HL mode begin and end immediately: /********/ actually no doxygen comment - used for "info boxes" :) /**/ <-- it really works --- end of doxygen HL mode -/*!*/ end of doxygen HL mode +/*!*/ end of doxygen HL mode <tag> <normal comment HL> /** \code rest of line is normal comment HL */ end of doxygen HL mode @@ -79,26 +79,26 @@ /** <a h*/ref="blubb"> end of doxygen HL mode /** <a */href="blubb"> end of doxygen HL mode /** <a*/ href="blubb"> end of doxygen HL mode -/** <*/a href="blubb"> end of doxygen HL mode - -//! <a href="blubb" href='blubb'> */ stay in doygen HL mode -//! <a href="blubb" href='blubb'*/> stay in doygen HL mode -//! <a href="blubb" href='blubb*/'> stay in doygen HL mode -//! <a href="blubb" href='blu*/bb'> stay in doygen HL mode -//! <a href="blubb" href='*/blubb'> stay in doygen HL mode -//! <a href="blubb" href=*/'blubb'> stay in doygen HL mode -//! <a href="blubb"> */ stay in doygen HL mode -//! <a href="blubb"*/> stay in doygen HL mode -//! <a href="blubb*/"> stay in doygen HL mode -//! <a href="blub*/b"> stay in doygen HL mode -//! <a href="*/blubb"> stay in doygen HL mode -//! <a href=*/"blubb"> stay in doygen HL mode -//! <a href*/="blubb"> stay in doygen HL mode -//! <a h*/ref="blubb"> stay in doygen HL mode -//! <a */href="blubb"> stay in doygen HL mode -//! <a*/ href="blubb"> stay in doygen HL mode -//! <*/a href="blubb"> stay in doygen HL mode -//! <a href="blubb"> stay in doygen HL <mode +/** <*/a href="blubb"> end of doxygen HL mode + +//! <a href="blubb" href='blubb'> */ stay in doygen HL mode +//! <a href="blubb" href='blubb'*/> stay in doygen HL mode +//! <a href="blubb" href='blubb*/'> stay in doygen HL mode +//! <a href="blubb" href='blu*/bb'> stay in doygen HL mode +//! <a href="blubb" href='*/blubb'> stay in doygen HL mode +//! <a href="blubb" href=*/'blubb'> stay in doygen HL mode +//! <a href="blubb"> */ stay in doygen HL mode +//! <a href="blubb"*/> stay in doygen HL mode +//! <a href="blubb*/"> stay in doygen HL mode +//! <a href="blub*/b"> stay in doygen HL mode +//! <a href="*/blubb"> stay in doygen HL mode +//! <a href=*/"blubb"> stay in doygen HL mode +//! <a href*/="blubb"> stay in doygen HL mode +//! <a h*/ref="blubb"> stay in doygen HL mode +//! <a */href="blubb"> stay in doygen HL mode +//! <a*/ href="blubb"> stay in doygen HL mode +//! <*/a href="blubb"> stay in doygen HL mode +//! <a href="blubb"> stay in doygen HL <mode here should be normal HL mode (no doxygen!) Tests for HTML tags in doxygen HL mode with tags: @@ -183,26 +183,26 @@ Some further tests for singlelinecomments (* / should not pop!) =============================================================== -/// a singlelinecommment blubb blubb */. stay in doxygen HL mode -/// \code a singlelinecommment blubb b*/lubb. stay in doxygen HL mode -/// \code*/ a singlelinecommment blubb blubb. stay in doxygen HL mode -/// \code a singlelinecommment blubb blubb +/// a singlelinecommment blubb blubb */. stay in doxygen HL mode +/// \code a singlelinecommment blubb b*/lubb. stay in doxygen HL mode +/// \code*/ a singlelinecommment blubb blubb. stay in doxygen HL mode +/// \code a singlelinecommment blubb blubb /// \brief a descriptive text (string) stay in doxygen HL mode /// \brief a descriptive text (string)*/ description should go on here -/// \brief a descriptive text */(string) description should go on here -/// \brief */a descriptive text (string) description should go on here -/// \ref aword a descriptive text (string) */ description should go on here -/// \ref aword a descriptive text (str*/ing) description should go on here -/// \ref aword a des*/criptive text (string) description should go on here -/// \ref aword*/ a descriptive text (string) description should go on here -/// \ref aw*/ord a descriptive text (string) description should go on here -/// \ref */aword a descriptive text (string) description should go on here +/// \brief a descriptive text */(string) description should go on here +/// \brief */a descriptive text (string) description should go on here +/// \ref aword a descriptive text (string) */ description should go on here +/// \ref aword a descriptive text (str*/ing) description should go on here +/// \ref aword a des*/criptive text (string) description should go on here +/// \ref aword*/ a descriptive text (string) description should go on here +/// \ref aw*/ord a descriptive text (string) description should go on here +/// \ref */aword a descriptive text (string) description should go on here HTML comment tests: =================== -//! \ref word de<!--*/ -->scriptive text (string) +//! \ref word de<!--*/ -->scriptive text (string) normal HL mode. -//! \ref w descriptive text (string) +//! \ref w descriptive text (string) /** \ref word de<!--*/ -->scriptive text (string) normal HL mode. /** \ref w <!-- @@ -215,19 +215,19 @@ And final tests for a word: a single char: =========================================== <tag> <word> <rest of line as string> -//! \ref word descriptive text (string) -//! \ref w descriptive text (string) +//! \ref word descriptive text (string) +//! \ref w descriptive text (string) <tag> <word> <word> <rest is normal HL> -//! \image word1 word2 b descriptive text (string) -//! \image a word b descriptive text (string) +//! \image word1 word2 b descriptive text (string) +//! \image a word b descriptive text (string) <tag> <rest of line is string> -//! \brief A b c d e description should go on here +//! \brief A b c d e description should go on here <tag> <word> <rest of line is normal doxygen HL mode> -//! \file word rest of line is normal comment HL -//! \file a word rest of line is normal comment HL +//! \file word rest of line is normal comment HL +//! \file a word rest of line is normal comment HL no doxygen HL mode here. == END OF TESTFILE == diff --git a/autotests/html/highlight.js.html b/autotests/html/highlight.js.html --- a/autotests/html/highlight.js.html +++ b/autotests/html/highlight.js.html @@ -4,39 +4,39 @@highlight.js -/* test.js - test for javascript.xml syntax file */ -// Note: this script will not, and is not supposed to, compile in any js engine. +/* test.js - test for javascript.xml syntax file */ +// Note: this script will not, and is not supposed to, compile in any js engine. -/* +/* NOTE: The words "todo", "fixme" and "note" should be rendered in a different style within comments, match should be caseless (to test for regexp insensitive attribute). The regex used for this rule is */ String = /\b(?:fixme|todo|note)\b/ - /* Thus, for example "Notebook" is not caught by + /* Thus, for example "Notebook" is not caught by this rule. (the "?:" in the subpattern is there to avoid the regex engine wasting time saving a backref, which is not used for anything. I do not know if the overhead of parsing that is greater than the time saved by not capturing the text...) The rule for catching these words is placed in a context "Comment common", which is used by both comment contexts (single line, multiline) using the new "IncludeRules" item. */ -// test if regex support works - nice with new fallthrough prop in context:) +// test if regex support works - nice with new fallthrough prop in context:) somestring.replace( /dooh/ , "bah!"); -re=/foo/ig; // hehe +re=/foo/ig; // hehe somestring.search( /^foo\w+\s\d{0,15}$/ ); re = /dooh/; -// This is supposedly legal: +// This is supposedly legal: re = somebool ? /foo/ : /bar/; -// NOTE - Special case: an empty regex, not a comment. -// The rule uses a positive lookahead assertion to catch it: "//(?=;)". -re = //; +// NOTE - Special case: an empty regex, not a comment. +// The rule uses a positive lookahead assertion to catch it: "//(?=;)". +re = //; re = /a|b/; /* @@ -58,50 +58,50 @@ re = /\/\//; re = /a|b/; -// the following are not regexps in E4X (=xml embedded into JavaScript) +// the following are not regexps in E4X (=xml embedded into JavaScript) var p = <p>Hello World</p> var p = /</ var p = />/ -// a test if #pop back from a comment will work -re = /*/foo/*/ /bar/; -// ^ POP -// ^ we got back after pop in comment, if there is regexp attribs here :-) +// a test if #pop back from a comment will work +re = /*/foo/*/ /bar/; +// ^ POP +// ^ we got back after pop in comment, if there is regexp attribs here :-) /* Some tests if the fallthrough works. The fallthrough happens if a regexp is not found in a possible (!) position, which is after "search(" or "replace(" or "=" or "?" or ":" in version 0.1 of the xml file */ var foo = 'bar'; -// ^ fallthrough! +// ^ fallthrough! somestring.replace( new RegExp("\\b\\w+\\b"), "word: $1"); -// ^ fallthrough expected. ("new" whould be bold) +// ^ fallthrough expected. ("new" whould be bold) something.method = - function ( a, b, c ) { /* ... */ } -// ^ fallthrough ?! + function ( a, b, c ) { /* ... */ } +// ^ fallthrough ?! something.other = -function ( d, e, f ) { /* ... */ } -// fallthrough expected at col 0 ("function" should be bold) +function ( d, e, f ) { /* ... */ } +// fallthrough expected at col 0 ("function" should be bold) var ary = new Array(5); -// ^ fallthrough ? (if keyword is correctly rendered) +// ^ fallthrough ? (if keyword is correctly rendered) var b = a ? 1 : 0; -// ^ ^ fallthroughs. numbers must be rendered correctly. +// ^ ^ fallthroughs. numbers must be rendered correctly. var c = d ? true : false; var conditinalstring = b ? "something" : "something else"; -// guess... +// guess... /* @@ -132,7 +132,7 @@ with (a) { do { - stuff( b ); // a.b if it exists + stuff( b ); // a.b if it exists } while (itmakessense); } diff --git a/autotests/html/highlight.lhs.html b/autotests/html/highlight.lhs.html --- a/autotests/html/highlight.lhs.html +++ b/autotests/html/highlight.lhs.html @@ -38,7 +38,7 @@ > strangefunction 1 = "hello" > strangefunction 2 = "what's up" > strangefunction 3 = (strangefunction 1) ++ ", " ++ (strangefunction 2) -> strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" +> strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" > strangefunction 5 = '\n':[] > strangefunction 6 = '\invalidhaskell':[] diff --git a/autotests/html/highlight.lua.html b/autotests/html/highlight.lua.html --- a/autotests/html/highlight.lua.html +++ b/autotests/html/highlight.lua.html @@ -6,7 +6,7 @@#!/usr/bin/env lua --- Metatables +-- Metatables t = { __add=function(a,b)return a+b end, __sub=function(a,b)return a-b end, @@ -33,12 +33,12 @@ __tostring=function(a)return tostring(a) end, __pairs=function(t)return pairs(a) end, - -- setmetatable + -- setmetatable __metatable=true - -- Garbage collector + -- Garbage collector __gc=function() end - -- Weak table - __mode='k' -- or 'v' + -- Weak table + __mode='k' -- or 'v' } a or b @@ -52,7 +52,7 @@ a;a --- String +-- String '\a' '\b' '\f' @@ -69,8 +69,8 @@ '\231' '\23' '\2' -'\u{100201}' -- max 6 digits -'\2a\ks' -- error +'\u{100201}' -- max 6 digits +'\2a\ks' -- error 'multi\ line' @@ -89,13 +89,13 @@ 123"]==] --- Decimal +-- Decimal 3 345 0xff 0xBEBADA --- Float +-- Float 3. .3 3.0 @@ -110,13 +110,13 @@ 0xA.p+4 0x.ap4 0X1.921FB54442D18P+1 --- error +-- error 32p 0xp-4 0x.p-4 --- single comment +-- single comment xyz() --[[ long comment @@ -126,17 +126,17 @@ a = { [f(1)] = g; "x", "y"; x = 1, f(x), [30] = 23; 45 } --- is equivalent to +-- is equivalent to do local t = {} t[f(1)] = g - t[1] = "x" -- 1st exp - t[2] = "y" -- 2nd exp - t.x = 1 -- t["x"] = 1 - t[3] = f(x) -- 3rd exp + t[1] = "x" -- 1st exp + t[2] = "y" -- 2nd exp + t.x = 1 -- t["x"] = 1 + t[3] = f(x) -- 3rd exp t[30] = 23 - t[4] = 45 -- 4th exp + t[4] = 45 -- 4th exp a = t end @@ -161,7 +161,7 @@ a[i] = function () y=y+1; return x+y end end ---! \brief gfind is deprecated +--! \brief gfind is deprecated string.gfind('s') string.gmatch('f')