Hello community, here is the log from the commit of package highlight for openSUSE:Factory checked in at 2020-05-16 22:26:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/highlight (Old) and /work/SRC/openSUSE:Factory/.highlight.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "highlight" Sat May 16 22:26:18 2020 rev:30 rq:805800 version:3.57 Changes: -------- --- /work/SRC/openSUSE:Factory/highlight/highlight.changes 2020-04-15 20:07:41.406153916 +0200 +++ /work/SRC/openSUSE:Factory/.highlight.new.2738/highlight.changes 2020-05-16 22:26:25.773284849 +0200 @@ -1,0 +2,13 @@ +Fri May 15 10:39:30 UTC 2020 - antoine.belv...@opensuse.org + +- Update to version 3.57: + * Added support for Haml (gl#saalen/highlight#140). + * Added support for Wren. + * Added Lua function `OverrideParam`. + * Fixed regression in xterm256 or truecolor output + (gl#saalen/highlight#152). + * Fixed `--list-scripts` with read-only language definitions + (gl#saalen/highlight#154). + * Improved several language definitions. + +------------------------------------------------------------------- Old: ---- highlight-3.56.tar.bz2 highlight-3.56.tar.bz2.asc New: ---- highlight-3.57.tar.bz2 highlight-3.57.tar.bz2.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ highlight.spec ++++++ --- /var/tmp/diff_new_pack.c1dO1b/_old 2020-05-16 22:26:26.801286959 +0200 +++ /var/tmp/diff_new_pack.c1dO1b/_new 2020-05-16 22:26:26.801286959 +0200 @@ -18,7 +18,7 @@ %bcond_without gui Name: highlight -Version: 3.56 +Version: 3.57 Release: 0 Summary: Universal Source Code to Formatted Text Converter License: GPL-3.0-or-later ++++++ highlight-3.56.tar.bz2 -> highlight-3.57.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/ChangeLog.adoc new/highlight-3.57/ChangeLog.adoc --- old/highlight-3.56/ChangeLog.adoc 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/ChangeLog.adoc 2020-05-14 21:44:20.000000000 +0200 @@ -6,6 +6,18 @@ :toc: left :toclevels: 1 +== highlight 3.57 + +12.05.2020 + + - added support for Haml (https://gitlab.com/saalen/highlight/-/issues/140) + - added support for Wren + - added Lua function `OverrideParam` + - fixed regression in xterm256 or truecolor output (https://gitlab.com/saalen/highlight/-/issues/152) + - fixed `--list-scripts` with read-only language definitions (https://gitlab.com/saalen/highlight/-/issues/154) + - improved several language definitions + - Windows GUI: added dark mode + == highlight 3.56 06.04.2020 @@ -66,7 +78,7 @@ - CLI: added optional fallback syntax to `--force` (https://gitlab.com/saalen/highlight/issues/126) - CLI: added option `--max-size` (https://gitlab.com/saalen/highlight/issues/127) - GUI: added multibyte path trace window - - GUI: fixed superflouos creation of the same stylesheet file + - GUI: fixed superfluous creation of the same stylesheet file == highlight 3.52 @@ -113,14 +125,13 @@ 06.02.2019 - - fixed more problems with syntax test indicators reporting wrong states - (https://gitlab.com/saalen/highlight/issues/102) + - fixed more problems with syntax test indicators reporting wrong states (https://gitlab.com/saalen/highlight/issues/102) - added support for Meson, Solidity, TOML and Terraform - improved Perl and Yaml highlighting - added Categories field to all config files - - CLI: added category info in --list-scripts output - - CLI: added --list-cat option (https://gitlab.com/saalen/highlight/issues/99) - - CLI: added optional topic parameter to --help + - CLI: added category info in `--list-scripts` output + - CLI: added `--list-cat` option (https://gitlab.com/saalen/highlight/issues/99) + - CLI: added optional topic parameter to `--help` - GUI: added theme category selection - GUI: display categories of selected syntax or theme diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/README.adoc new/highlight-3.57/README.adoc --- old/highlight-3.56/README.adoc 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/README.adoc 2020-05-14 21:44:20.000000000 +0200 @@ -888,9 +888,6 @@ it possible to apply custom settings without the need to edit installed configuration files. You can apply multiple plugins by using the `--plug-in` option more than once. -If your syntax supports persistent states, use `--two-pass` to generate a -plug-in file which can be used in subsequent invocations. - See {README_PLUGINS} for a detailed description and examples of packaged plugins. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/README_DE.adoc new/highlight-3.57/README_DE.adoc --- old/highlight-3.56/README_DE.adoc 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/README_DE.adoc 2020-05-14 21:44:20.000000000 +0200 @@ -899,13 +899,10 @@ Konfigurations-Dateien zu aendern. Man kann mehrere Plugins anwenden, indem die `--plug-in` Option wiederholt angegeben wird. -Wenn die Syntax Persistenz unterstuetzt, kann mit `--two-pass` ein Plugin erzeugt -werden, das bei folgenden Aufrufen genutzt werden kann. Siehe {README_PLUGINS} um mehr darueber zu erfahren. - === DATEIZUORDNUNGEN In {filetypes_conf} werden Dateizuordnungen und Shebang-Definitionen eingetragen. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/README_PLUGINS.adoc new/highlight-3.57/README_PLUGINS.adoc --- old/highlight-3.56/README_PLUGINS.adoc 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/README_PLUGINS.adoc 2020-05-14 21:44:20.000000000 +0200 @@ -1,6 +1,6 @@ = HIGHLIGHT PLUGIN MANUAL André Simon -v3.53, July 2019 +v3.57, May 2020 :lang: en :toc: left :toc-title: Contents @@ -293,6 +293,29 @@ does no longer match. +=== FUNCTION OVERRIDEPARAM + +[[OverrideParam]] +This function enables modification of internal default values concerning the +parser or output formats. This function is experimental and subject to change. +Currently it supports these parameters: + +[horizontal] +`state.string.raw` :: `true` or `false` +`format.maskws` :: `true` or `false` +`format.spacer` :: whitespace format string + +See `langDefs/toml.lang` and `plugins/outhtml_ie7_webctrl.lua` for examples. + +................................................................................ +OverrideParam(keyword, kwGroupID) + + Parameters: paramName: name of configuration item + paramVal: value + Returns: true if successful +................................................................................ + + === DECORATE FUNCTIONS [[Decorate]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/extras/AsciiDoc/example_mod.asciidoc new/highlight-3.57/extras/AsciiDoc/example_mod.asciidoc --- old/highlight-3.56/extras/AsciiDoc/example_mod.asciidoc 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/extras/AsciiDoc/example_mod.asciidoc 2020-05-14 21:44:20.000000000 +0200 @@ -37,7 +37,7 @@ === Example 1 -For PureBasic code I've defined a dedicated theme mimicing the native IDE of the language. +For PureBasic code I've defined a dedicated theme mimicking the native IDE of the language. [source,purebasic] ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/extras/AsciiDoc/sass/_hl-adoc-template.scss new/highlight-3.57/extras/AsciiDoc/sass/_hl-adoc-template.scss --- old/highlight-3.56/extras/AsciiDoc/sass/_hl-adoc-template.scss 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/extras/AsciiDoc/sass/_hl-adoc-template.scss 2020-05-14 21:44:20.000000000 +0200 @@ -6,7 +6,7 @@ // ***************************************************************************** // A reusable variables-based '@import' template to quickly define Highlight // themes for Asciidoctor. It can create both generic themes as well as themes -// targetting a specific language, via the $HL-Lang variable. +// targeting a specific language, via the $HL-Lang variable. // ============================================================================= // Default Values diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/gui_files/ext/fileopenfilter.conf new/highlight-3.57/gui_files/ext/fileopenfilter.conf --- old/highlight-3.56/gui_files/ext/fileopenfilter.conf 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/gui_files/ext/fileopenfilter.conf 2020-05-14 21:44:20.000000000 +0200 @@ -83,6 +83,7 @@ GDScript (*.gd) Graphviz (*.dot) Groovy (*.groovy *.grv) +Haml (*.haml) Haskell (*.hs *.sbcl) HaskellLHS (*.lhs) haXe (*.hx) @@ -226,6 +227,7 @@ VisualBasic/Basic (*.bas *.bi *.b) Vue.js (*.vue) Whiley (*.whiley) +Wren (*.wren) XML (*.xml) Yaiff (*.yaiff) Yang (*.yang) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/ada.lang new/highlight-3.57/langDefs/ada.lang --- old/highlight-3.56/langDefs/ada.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/ada.lang 2020-05-14 21:44:20.000000000 +0200 @@ -3,8 +3,8 @@ Categories = {"source"} - Keywords={ + { Id=1, List={"abort", "else", "new", "return", "abs", "elsif", "not", "reverse", "abstract", "end", "null", "accept", "entry", "select", "access", "exception", @@ -15,32 +15,30 @@ "is", "use", "raise", "declare", "range", "when", "delay", "limited", "record", "while", "delta", "loop", "rem", "with", "digits", "renames", "do", "mod", "requeue", "xor"}, - }, + }, { Id=2, List={"boolean", "integer", "natural", "positive", "float", "character", "string", "duration", "short_integer", "long_integer", "short_float", - "long_float"}, - }, + "long_float", "wide_character", "wide_string", "short_short_integer", + "long_long_integer", "short_short_float", "long_long_float"}, + }, + { Id=3, - List={"wide_character", "wide_string", "short_short_integer", "long_long_integer", - "short_short_float", "long_long_float"}, - }, + Regex=[[(\w+)\s*\(]] + }, { Id=4, List={"true", "false"}, - }, + }, { Id=4, Regex=[[ [\w\)]+('\w+) ]], - }, + }, { Id=4, Regex=[[''']], - } -} + } --- Workaround: distinguish string delimiters and event markers --- (same eymbol: ') +} --workaround for special string ''' - Strings={ Delimiter=[["|']], Escape = [[ \\[^'] ]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/algol.lang new/highlight-3.57/langDefs/algol.lang --- old/highlight-3.56/langDefs/algol.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/algol.lang 2020-05-14 21:44:20.000000000 +0200 @@ -16,6 +16,10 @@ } }, + { Id=3, + Regex=[[ \$\w+?\$ ]] + }, + { Id=4, Regex=[[(\w+)\s*\(]] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/autohotkey.lang new/highlight-3.57/langDefs/autohotkey.lang --- old/highlight-3.56/langDefs/autohotkey.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/autohotkey.lang 2020-05-14 21:44:20.000000000 +0200 @@ -60,6 +60,9 @@ }, { Id=4, Regex=[[\:.+?\:\:]], + }, + { Id=4, + Regex=[[(\w+)\s*\(]] } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/awk.lang new/highlight-3.57/langDefs/awk.lang --- old/highlight-3.56/langDefs/awk.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/awk.lang 2020-05-14 21:44:20.000000000 +0200 @@ -21,11 +21,15 @@ { Id=3, List={"function"}, }, + { Id=4, + Regex=[[ \$[\w]+ ]], + } } Strings={ Delimiter=[["|']], - Escape=[[ [\\%]\d{3}|[\\%]x\d{2}|[\\%][ntvbrfa\\\?'"%] ]] + Escape=[[ [\\%]\d{3}|[\\%]x\d{2}|[\\%][ntvbrfa\\\?'"%] ]], + Interpolation = [[ %\w ]], } IgnoreCase=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/c.lang new/highlight-3.57/langDefs/c.lang --- old/highlight-3.56/langDefs/c.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/c.lang 2020-05-14 21:44:20.000000000 +0200 @@ -44,6 +44,7 @@ Strings = { Delimiter=[["|']], RawPrefix="R", + Interpolation = [[ %\w ]], } Comments = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/clojure.lang new/highlight-3.57/langDefs/clojure.lang --- old/highlight-3.56/langDefs/clojure.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/clojure.lang 2020-05-14 21:44:20.000000000 +0200 @@ -26,6 +26,7 @@ Strings={ Delimiter=[["]], Interpolation=[[ %s ]], + Escape=[=[\\[\w]]=], } Comments={ @@ -38,6 +39,6 @@ } } -Operators=[[\(|\)|\[|\]|\{|\}|\,|\:|\&|<|>|\!|\+|\=|\/|\*|\']] +Operators=[[\(|\)|\[|\]|\{|\}|\,|\:|\&|<|>|\!|\+|\=|\/|\*|\'|\#|\%|\^|\.]] --FIXME no default escchar param: regex(\\\d{3}|\\x[[:xdigit:]]{2}|\\[ntvbrfa\\\?'"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/d.lang new/highlight-3.57/langDefs/d.lang --- old/highlight-3.56/langDefs/d.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/d.lang 2020-05-14 21:44:20.000000000 +0200 @@ -8,94 +8,24 @@ Keywords={ { Id=1, List={ - "abstract","alias","align","asm","assert","auto","body","bool","break","byte", - "case","cast","catch","cdouble","cent","cfloat","char","class","const", - "continue","creal","dchar","debug","default","delegate","delete","deprecated", - "do","double","else","enum","export","extern","false", - "final","finally","float","for","foreach","foreach_reverse","function","goto", - "idouble","if","ifloat","immutable","import","in","inout", - "int","interface","invariant","ireal","is","lazy","long","macro","mixin", + "abstract","alias","align","asm","assert","auto","body","break", + "case","cast","catch","class","const", + "continue","debug","default","delegate","delete","deprecated", + "do","else","enum","export","extern","false", + "final","finally","for","foreach","foreach_reverse","function","goto", + "if","immutable","import","in","inout", + "interface","invariant","is","lazy","macro","mixin", "module","new","nothrow","null","out","override","package","pragma","private", - "protected","public","pure","real","ref","return","scope","shared","short", + "protected","public","pure","ref","return","scope","shared", "static","struct","super","switch","synchronized","template","this","throw", - "true","try","typedef","typeid","typeof","ubyte","ucent","uint","ulong","union", - "unittest","ushort","version","void","volatile","wchar","while","with" + "true","try","typedef","typeid","typeof","union", + "unittest","version","volatile","while","with" }, }, { Id=2, - List={"aaa", "aad", "aam", "aas", "adc", "add", "addpd", "addps", - "addsd", "addss", "and", "andnpd", "andnps", "andpd", "andps", "arpl", - "bound", "bsf", "bsr", "bswap", "bt", "btc", "btr", "bts", "call", - "cbw", "cdq", "clc", "cld", "clflush", "cli", "clts", "cmc", "cmova", - "cmovae", "cmovb", "cmovbe", "cmovc", "cmove", "cmovg", "cmovge", "cmovl", - "cmovle", "cmovna", "cmovnae", "cmovnb", "cmovnbe", "cmovnc", "cmovne", - "cmovng", "cmovnge", "cmovnl", "cmovnle", "cmovno", "cmovnp", "cmovns", - "cmovnz", "cmovo", "cmovp", "cmovpe", "cmovpo", "cmovs", "cmovz", "cmp", - "cmppd", "cmpps", "cmps", "cmpsb", "cmpsd", "cmpss", "cmpsw", - "cmpxch8b", "cmpxchg", "comisd", "comiss", "cpuid", "cvtdq2pd", "cvtdq2ps", - "cvtpd2dq", "cvtpd2pi", "cvtpd2ps", "cvtpi2pd", "cvtpi2ps", "cvtps2dq", - "cvtps2pd", "cvtps2pi", "cvtsd2si", "cvtsd2ss", "cvtsi2sd", "cvtsi2ss", - "cvtss2sd", "cvtss2si", "cvttpd2dq", "cvttpd2pi", "cvttps2dq", "cvttps2pi", - "cvttsd2si", "cvttss2si", "cwd", "cwde", "da", "daa", "das", "db", "dd", "de", "dec", "df", - "di", "div", "divpd", "divps", "divsd", "divss", "dl", "dq", "ds", "dt", - "dw", "emms", "enter", "f2xm1", "fabs", "fadd", "faddp", "fbld", - "fbstp", "fchs", "fclex", "fcmovb", "fcmovbe", "fcmove", "fcmovnb", - "fcmovnbe", "fcmovne", "fcmovnu", "fcmovu", "fcom", "fcomi", "fcomip", - "fcomp", "fcompp", "fcos", "fdecstp", "fdisi", "fdiv", "fdivp", "fdivr", - "fdivrp", "feni", "ffree", "fiadd", "ficom", "ficomp", "fidiv", "fidivr", - "fild", "fimul", "fincstp", "finit", "fist", "fistp", "fisub", "fisubr", - "fld", "fld1", "fldcw", "fldenv", "fldl2e", "fldl2t", "fldlg2", - "fldln2", "fldpi", "fldz", "fmul", "fmulp", "fnclex", "fndisi", "fneni", - "fninit", "fnop", "fnsave", "fnstcw", "fnstenv", "fnstsw", "fpatan", - "fprem", "fprem1", "fptan", "frndint", "frstor", "fsave", "fscale", "fsetpm", - "fsin", "fsincos", "fsqrt", "fst", "fstcw", "fstenv", "fstp", "fstsw", - "fsub", "fsubp", "fsubr", "fsubrp", "ftst", "fucom", "fucomi", "fucomip", "fucomp", "fucompp", - "fwait", "fxam", "fxch", "fxrstor", "fxsave", "fxtract", "fyl2x", "fyl2xp1", - "hlt", "idiv", "imul", "in", "inc", "ins", "insb", "insd", "insw", - "int", "into", "invd", "invlpg", "iret", "iretd", "ja", "jae", "jb", - "jbe", "jc", "jcxz", "je", "jecxz", "jg", "jge", "jl", "jle", "jmp", - "jna", "jnae", "jnb", "jnbe", "jnc", "jne", "jng", "jnge", "jnl", "jnle", - "jno", "jnp", "jns", "jnz", "jo", "jp", "jpe", "jpo", "js", "jz", - "lahf", "lar", "ldmxcsr", "lds", "lea", "leave", "les", "lfence", "lfs", - "lgdt", "lgs", "lidt", "lldt", "lmsw", "lock", "lods", "lodsb", "lodsd", - "lodsw", "loop", "loope", "loopne", "loopnz", "loopz", "lsl", "lss", "ltr", - "maskmovdqu", "maskmovq", "maxpd", "maxps", "maxsd", "maxss", "mfence", - "minpd", "minps", "minsd", "minss", "mov", "movapd", "movaps", "movd", - "movdq2q", "movdqa", "movdqu", "movhlps", "movhpd", "movhps", "movlhps", - "movlpd", "movlps", "movmskpd", "movmskps", "movntdq", "movnti", "movntpd", "movntps", - "movntq", "movq", "movq2dq", "movs", "movsb", "movsd", "movss", "movsw", - "movsx", "movupd", "movups", "movzx", "mul", "mulpd", "mulps", "mulsd", - "mulss", "neg", "nop", "not", "or", "orpd", "orps", "out", "outs", - "outsb", "outsd", "outsw", "packssdw", "packsswb", "packuswb", "paddb", - "paddd", "paddq", "paddsb", "paddsw", "paddusb", "paddusw", "paddw", "pand", - "pandn", "pavgb", "pavgw", "pcmpeqb", "pcmpeqd", "pcmpeqw", "pcmpgtb", - "pcmpgtd", "pcmpgtw", "pextrw", "pinsrw", "pmaddwd", "pmaxsw", "pmaxub", - "pminsw", "pminub", "pmovmskb", "pmulhuw", "pmulhw", "pmullw", - "pmuludq", "pop", "popa", "popad", "popf", "popfd", "por", "prefetchnta", - "prefetcht0", "prefetcht1", "prefetcht2", "psadbw", "pshufd", "pshufhw", - "pshuflw", "pshufw", "pslld", "pslldq", "psllq", "psllw", "psrad", - "psraw", "psrld", "psrldq", "psrlq", "psrlw", "psubb", "psubd", "psubq", - "psubsb", "psubsw", "psubusb", "psubusw", "psubw", "punpckhbw", "punpckhdq", - "punpckhqdq", "punpckhwd", "punpcklbw", "punpckldq", "punpcklqdq", - "punpcklwd", "push", "pusha", "pushad", "pushf", "pushfd", "pxor", "rcl", - "rcpps", "rcpss", "rcr", "rdmsr", "rdpmc", "rdtsc", "rep", "repe", - "repne", "repnz", "repz", "ret", "retf", "rol", "ror", "rsm", "rsqrtps", - "rsqrtss", "sahf", "sal", "sar", "sbb", "scas", "scasb", "scasd", "scasw", - "seta", "setae", "setb", "setbe", "setc", "sete", "setg", "setge", - "setl", "setle", "setna", "setnae", "setnb", "setnbe", "setnc", "setne", - "setng", "setnge", "setnl", "setnle", "setno", "setnp", "setns", "setnz", - "seto", "setp", "setpe", "setpo", "sets", "setz", "sfence", "sgdt", - "shl", "shld", "shr", "shrd", "shufpd", "shufps", "sidt", "sldt", - "smsw", "sqrtpd", "sqrtps", "sqrtsd", "sqrtss", "stc", "sti", "stmxcsr", - "stos", "stosb", "stosd", "stosw", "str", "sub", "subpd", "subps", - "subsd", "subss", "sysenter", "sysexit", "test", "ucomisd", "ucomiss", "ud2", "unpckhpd", "unpckhps", - "unpcklpd", "unpcklps", "verr", "verw", "wait", "wbinvd", "wrmsr", "xadd", - "xchg", "xlat", "xlatb", "xor", "xorpd", "xorps", "addsubpd", "addsubps", - "fisttp", "haddpd", "haddps", "hsubpd", "hsubps", "lddqu", "monitor", "movddup", - "movshdup", "movsldup", "mwait", "pavgusb", "pf2id", "pfacc", "pfadd", - "pfcmpeq", "pfcmpge", "pfcmpgt", "pfmax", "pfmin", "pfmul", "pfnacc", - "pfpnacc", "pfrcp", "pfrcpit1", "pfrcpit2", "pfrsqit1", "pfrsqrt", "pfsub", - "pfsubr", "pi2fd", "pmulhrw", "pswapd"}, + List={"bool","byte","cdouble","char","creal","dchar","double","float","ifloat", + "idouble","int","ireal","long","real","short","ubyte","ucent","uint","ulong", + "cent","cfloat","ushort","wchar","void"}, }, { Id=3, Regex=[[\@\w+]], @@ -109,7 +39,7 @@ Strings={ Delimiter=[["|'|`]], RawPrefix="r", - Interpolation=[[ %\d?\$?s ]], + Interpolation=[[ %\w ]], DelimiterPairs= { { Open=[[ q"[\[\(\<\{] ]], Close=[[ "[\]\)\>\}] ]], Raw=true } } @@ -131,7 +61,7 @@ } } -Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\~|\$]] +Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\~|\$|\^]] Digits=[[ (?:0x|0X|0b)[0-9a-fA-F_]+|\d*[\.\_]?\d+(?:[eE][\-\+]?\d+)?[fFlLuU]? ]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/elixir.lang new/highlight-3.57/langDefs/elixir.lang --- old/highlight-3.56/langDefs/elixir.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/elixir.lang 2020-05-14 21:44:20.000000000 +0200 @@ -36,8 +36,8 @@ Strings={ Delimiter=[["""|'''|"|']], RawPrefix="r", - Escape=[=[\\[ntvbrfa\\\?'"]|\\\d{3}|\\x[[:xdigit:]]{2}]=], - Interpolation=[[ #\{\w+\} ]] + Escape=[=[\\[ntvbrfa\\\?'"]|\\\d{3}|\\x[[:xdigit:]]{2}]=] + } Comments = { @@ -50,3 +50,4 @@ IgnoreCase=false Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^|\?]] + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/erlang.lang new/highlight-3.57/langDefs/erlang.lang --- old/highlight-3.56/langDefs/erlang.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/erlang.lang 2020-05-14 21:44:20.000000000 +0200 @@ -35,7 +35,7 @@ Strings={ Delimiter=[["|']], - Interpolation=[[ ~s ]], + Interpolation=[[ ~\w ]], } IgnoreCase=false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/fsharp.lang new/highlight-3.57/langDefs/fsharp.lang --- old/highlight-3.56/langDefs/fsharp.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/fsharp.lang 2020-05-14 21:44:20.000000000 +0200 @@ -20,7 +20,7 @@ Regex=[[ [use|let]\s+(mutable\s+)?(\w+)]], Group=2 }, { Id=4, - Regex=[[\b[A-Z][a-zA-Z0-9_']*]], + Regex=[[\b[A-Z][a-zA-Z0-9_]*]], }, } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/gambas.lang new/highlight-3.57/langDefs/gambas.lang --- old/highlight-3.56/langDefs/gambas.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/gambas.lang 2020-05-14 21:44:20.000000000 +0200 @@ -3,7 +3,7 @@ Categories = {"source", "script"} -Identifiers=[[ [a-zA-Z_]+\$? ]] +Identifiers=[[ [a-zA-Z_][a-zA-Z_0-9]+\$? ]] Keywords={ { Id=1, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/haml.lang new/highlight-3.57/langDefs/haml.lang --- old/highlight-3.56/langDefs/haml.lang 1970-01-01 01:00:00.000000000 +0100 +++ new/highlight-3.57/langDefs/haml.lang 2020-05-14 21:44:20.000000000 +0200 @@ -0,0 +1,70 @@ + +Description="Haml (HTML Abstraction Markup Language)" + +Categories = {"source"} + +Keywords={ + + --tags: + { Id=1, + Regex=[[\%\w+]], + }, + + -- classes + { Id=2, + Regex=[[\.\w+]], + }, + + -- ids + { Id=3, + Regex=[[\#\w+]], + }, + + -- namespaces + { Id=4, + Regex=[[^\!\!\!.*]], + }, + +} + +Strings={ + Delimiter=[["]] +} + +IgnoreCase=true + +Comments={ + { Block=false, + Delimiter= { [[^\-\#|^\/]] }, + }, +} + +Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\&|<|>|\=|\+|\|]] + +--tbd +--NestedSections = { +-- { Lang="ruby", Delimiter= { [[^\s+\=\s]], [[$]] } }, +--} + + +commentMode=0 +lastLine=0 + +function OnStateChange(oldState, newState, token, kwGroupID, lno, col) + + if commentMode==1 then + if col==0 and newState ~= HL_LINE_COMMENT then + commentMode=0 + return newState + else + return HL_LINE_COMMENT + end + end + + if newState==HL_LINE_COMMENT then + commentMode=1 + end + + return newState + +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/icon.lang new/highlight-3.57/langDefs/icon.lang --- old/highlight-3.56/langDefs/icon.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/icon.lang 2020-05-14 21:44:20.000000000 +0200 @@ -12,10 +12,7 @@ List={"co-expression", "cset", "tfile", "integer", "list", "null", "real", "set", "string", "table", "window"}, }, { Id=3, - Regex=[[\&\w+]] - }, - { Id=3, - Regex=[[\$\w+]] + Regex=[[[\&\$\@]\w+]] }, { Id=4, Regex=[[(\w+)\s*\(]] @@ -34,5 +31,5 @@ }, } -Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|<|>|\!|\-|\+|\=|\/|\*|\+|\-|\~]] +Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|<|>|\!|\-|\+|\=|\/|\*|\+|\-|\~|\|]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/limbo.lang new/highlight-3.57/langDefs/limbo.lang --- old/highlight-3.56/langDefs/limbo.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/limbo.lang 2020-05-14 21:44:20.000000000 +0200 @@ -3,12 +3,11 @@ Categories = {"source"} - Keywords={ { Id=1, List={ "if", "else", "while", "do", "return", "list", "of", - "ref", "load", "import", "include"} + "ref", "load", "import", "include", "implement", "raise", "module"} }, { Id=2, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/lisp.lang new/highlight-3.57/langDefs/lisp.lang --- old/highlight-3.56/langDefs/lisp.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/lisp.lang 2020-05-14 21:44:20.000000000 +0200 @@ -19,6 +19,7 @@ Strings={ Delimiter=[[ " ]], + Escape=[=[\\[\w]]=], } Comments={ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/matlab.lang new/highlight-3.57/langDefs/matlab.lang --- old/highlight-3.56/langDefs/matlab.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/matlab.lang 2020-05-14 21:44:20.000000000 +0200 @@ -73,6 +73,9 @@ "waterfall", "white", "wk1const", "wk1read", "wk1wrec", "wk1write", "xlabel", "xor", "xyzchk", "ylabel", "zlabel"}, }, + { Id=3, + Regex=[[(\w+)\s*\:\:]] + }, } Strings = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/mod3.lang new/highlight-3.57/langDefs/mod3.lang --- old/highlight-3.56/langDefs/mod3.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/mod3.lang 2020-05-14 21:44:20.000000000 +0200 @@ -34,6 +34,7 @@ Strings={ Delimiter=[["|']], + Interpolation = [[ %\w ]] } IgnoreCase=true @@ -48,4 +49,4 @@ } } -Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\.]] +Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\.|\#]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/nemerle.lang new/highlight-3.57/langDefs/nemerle.lang --- old/highlight-3.56/langDefs/nemerle.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/nemerle.lang 2020-05-14 21:44:20.000000000 +0200 @@ -30,7 +30,7 @@ Strings={ Delimiter=[["|']], RawPrefix="@", - Interpolation=[[ %\w|\$\w+ ]], + Interpolation=[[ %\w|\$\w+|\{\d\} ]], } IgnoreCase=false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/netrexx.lang new/highlight-3.57/langDefs/netrexx.lang --- old/highlight-3.56/langDefs/netrexx.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/netrexx.lang 2020-05-14 21:44:20.000000000 +0200 @@ -46,4 +46,4 @@ } } -Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\~]] +Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\~|\|]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/ps1.lang new/highlight-3.57/langDefs/ps1.lang --- old/highlight-3.56/langDefs/ps1.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/ps1.lang 2020-05-14 21:44:20.000000000 +0200 @@ -23,7 +23,7 @@ "Import-Alias", "Import-Clixml", "Import-Csv", "Invoke-Expression", "Invoke-History", "Invoke-Item", "Join-Path", "Measure-Command", "Measure-Object", "Move-Item", "Move-ItemProperty", - "New-Alias", "New-Item", "New-ItemProperty", "New-Object", + "New-Alias", "New-Item", "New-ItemProperty", "New-Object", "Write-host", "New-PSDrive", "New-Service", "New-TimeSpan", "New-Variable", "Out-Default", "Out-File", "Out-Host", "Out-Null", "Out-Printer", "Out-String", "Pop-Location", "Push-Location", "Read-Host", @@ -40,7 +40,7 @@ "Where-Object", "Write-Debug", "Write-Error", "Write-Host", "Write-Output", "Write-Progress", "Write-Verbose", "Write-Warning", "switch", "function", "if", "throw", "else", - "while", "break", "in", "return", "try", "catch"}, + "while", "break", "in", "return", "try", "catch", "for"}, }, { Id=2, List={"ac", "asnp", "clc", "cli", "clp", "clv", "cpi", "cpp", "cvpa", @@ -77,7 +77,7 @@ }, } -Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\~|\?|\|]] +Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\~|\?|\||\.]] EnableIndentation=false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/rebol.lang new/highlight-3.57/langDefs/rebol.lang --- old/highlight-3.56/langDefs/rebol.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/rebol.lang 2020-05-14 21:44:20.000000000 +0200 @@ -23,7 +23,7 @@ Comments={ { Block=false, - Delimiter= { [[;|\/\/]] }, + Delimiter= { [[;]] }, }, { Block=true, Nested=false, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/rexx.lang new/highlight-3.57/langDefs/rexx.lang --- old/highlight-3.56/langDefs/rexx.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/rexx.lang 2020-05-14 21:44:20.000000000 +0200 @@ -81,5 +81,5 @@ } } -Operators=[[\(|\)|\[|\]|\.|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\||\@]] +Operators=[[\(|\)|\[|\]|\.|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\||\@|\?|\#]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/ruby.lang new/highlight-3.57/langDefs/ruby.lang --- old/highlight-3.56/langDefs/ruby.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/ruby.lang 2020-05-14 21:44:20.000000000 +0200 @@ -174,7 +174,7 @@ -- https://fossies.org/linux/misc/puppet-5.3.2.tar.gz/puppet-5.3.2/lib/puppet/indirector/hiera.rb?m=t - if token==")" or token=="}" or token=="{" and oldState~=HL_STRING then + if token==")" or token=="}" or token=="]" or token=="{" and oldState~=HL_STRING then return HL_OPERATOR end return newState diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/swift.lang new/highlight-3.57/langDefs/swift.lang --- old/highlight-3.56/langDefs/swift.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/swift.lang 2020-05-14 21:44:20.000000000 +0200 @@ -47,7 +47,7 @@ Delimiter=[["]], Interpolation = [[ \\\(.+?\)\)? ]], RawPrefix="R", - Escape = [[ \\t|\\0|\\t|\\v|\\r|\\"|\\'|\\u\{[0-9a-fA-F]+\} ]], + Escape = [[ \\t|\\0|\\v|\\r|\\"|\\'|\\u\{[0-9a-fA-F]+\} ]], } Comments = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/toml.lang new/highlight-3.57/langDefs/toml.lang --- old/highlight-3.56/langDefs/toml.lang 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/langDefs/toml.lang 2020-05-14 21:44:20.000000000 +0200 @@ -1,7 +1,11 @@ +-- for highlight 3.57 + Description="TOML" -Categories = {"markup"} +Categories = {"config"} + +Digits=[[ (?:0x|0o|0b)[0-9a-fA-F]+_?[0-9a-fA-F]*|\d*[\.\_]?[\d_]+(?:[eE][\-\+]?\d+)? ]] Keywords={ { Id=1, @@ -13,10 +17,17 @@ { Id=3, Regex=[[^\s*[\[^=#]+\s*=\s*(\S.*)#?]], }, + { Id=4, + List={"inf", "nan", "true", "false"} + }, + { Id=4, + Regex=[[\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[Z]?|\d{4}-\d{2}-\d{2}]] + } } Strings={ - Delimiter=[["]], + Delimiter=[["""|'''|"|']], + Escape = [[ \\[0%\\\"abfnrtv]|\\U[0-9a-fA-F]{8}|\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2} ]] } Comments={ @@ -27,3 +38,31 @@ Operators=[[\(|\)|\{|\}|\,|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\[|\] ]] + +function OnStateChange(oldState, newState, token, groupID) + + if rawStringDelim~=nil and token==rawStringDelim then + rawStringDelim=nil + return newState + end + if oldState==HL_STANDARD and (token=="'''" or token=="'") then + rawStringDelim=token + OverrideParam("state.string.raw", "true") + return newState + end + return newState +end + +--[[============================================================================ + CHANGELOG +================================================================================ + +v1.1 (2020/05/12) | Highlight 3.57 + + - makes use of OverrideParam to handle raw strings with identical start/end + delimiters + +v1.0 + - initial version + +--]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/langDefs/wren.lang new/highlight-3.57/langDefs/wren.lang --- old/highlight-3.56/langDefs/wren.lang 1970-01-01 01:00:00.000000000 +0100 +++ new/highlight-3.57/langDefs/wren.lang 2020-05-14 21:44:20.000000000 +0200 @@ -0,0 +1,49 @@ + +Description="Wren" + +Categories = {"source"} + +Digits = [[ \d+[\.]?\d+|\d\d* ]] + +Keywords={ + { Id=1, + List={ + "break", "class", "construct", "else", "for", "foreign", "if", "import", + "in", "is", "return", "static", "super", "this", "var", "while", + } + }, + { Id=2, + List= { + "null", "true", "false" + } + }, + { Id=3, + Regex=[[_\w+]] + }, + { Id=4, + Regex=[[(\w+)\s*\(]] + } +} + +Strings = { + Delimiter=[["]], + Interpolation = [[ %\([^(]+?\) ]], + Escape = [[ \\[0%\\\"abfnrtv]|\\U[0-9a-fA-F]{8}|\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2} ]] +} + +Comments = { + { Block=true, + Nested=true, + Delimiter = { [[\/\*]], [[\*\/]] } + }, + { + Block=false, + Delimiter = { [[//]] } + } +} + +IgnoreCase=false + +Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^|\?]] + +EnableIndentation=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/plugins/mark_lines.lua new/highlight-3.57/plugins/mark_lines.lua --- old/highlight-3.56/plugins/mark_lines.lua 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/plugins/mark_lines.lua 2020-05-14 21:44:20.000000000 +0200 @@ -11,12 +11,12 @@ if #HL_PLUGIN_PARAM == 0 then return end - --we need a dummy kw class to get the line mark colour into the colour map + -- we need a dummy kw class to get the line mark colour into the colour map if HL_OUTPUT == HL_FORMAT_RTF then table.insert( Keywords, { Id=#Keywords+1, List={"HL_RTF_DUMMY" } } ) end - -- explode(seperator, string) + -- explode (separator, string) function explode(d,p) local t, ll t={} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/plugins/outhtml_ie7_webctrl.lua new/highlight-3.57/plugins/outhtml_ie7_webctrl.lua --- old/highlight-3.56/plugins/outhtml_ie7_webctrl.lua 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/plugins/outhtml_ie7_webctrl.lua 2020-05-14 21:44:20.000000000 +0200 @@ -1,4 +1,4 @@ ---for highlight 3.36 +--for highlight 3.57 Description="Adapt HTML to ancient MS Web Controls" @@ -11,16 +11,20 @@ return end - -- new element; subject to change - GeneratorOverride = { - { Param="Spacer", Value=" " }, - { Param="MaskWS", Value="true" }, - } - function DecorateLineBegin(lineNumber) return ' ' end + -- trigger OverrideParam + function OnStateChange(oldState, newState, token, groupID, lineno, column) + if (called==nil) then + OverrideParam("format.spacer", " ") + OverrideParam("format.maskws", "true") + called=1 + end + return newState + end + end Plugins={ @@ -28,3 +32,16 @@ { Type="lang", Chunk=syntaxUpdate }, } + +--[[============================================================================ + CHANGELOG +================================================================================ + +v1.1 (2020/05/12) | Highlight 3.57 + + - makes use of OverrideParam to change default HTML whitespace handling + +v1.0 + - initial version + +--]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/cli/cmdlineoptions.h new/highlight-3.57/src/cli/cmdlineoptions.h --- old/highlight-3.56/src/cli/cmdlineoptions.h 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/cli/cmdlineoptions.h 2020-05-14 21:44:20.000000000 +0200 @@ -357,7 +357,7 @@ const vector <string> &getAStyleOptions() const; /** \return 1 if trailing nl should be omitted, - * 2 if it should only be ommitted for empty input */ + * 2 if it should only be omitted for empty input */ int disableTrailingNL() const ; /** \return The given base font size, empty string by default */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/cli/main.cpp new/highlight-3.57/src/cli/main.cpp --- old/highlight-3.56/src/cli/main.cpp 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/cli/main.cpp 2020-05-14 21:44:20.000000000 +0200 @@ -168,7 +168,7 @@ << " with --" << option << ". Filter categories with --list-cat." << endl; if (kind=="theme") { - cout <<"\nApply --base16 to select a Base16 theme." << endl; + cout <<"\nAdd base16/ prefix to apply a Base16 theme." << endl; } printConfigInfo(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/core/codegenerator.cpp new/highlight-3.57/src/core/codegenerator.cpp --- old/highlight-3.56/src/core/codegenerator.cpp 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/core/codegenerator.cpp 2020-05-14 21:44:20.000000000 +0200 @@ -2,7 +2,7 @@ codegenerator.cpp - description ------------------- begin : Die Jul 9 2002 - copyright : (C) 2002-2019 by Andre Simon + copyright : (C) 2002-2020 by Andre Simon email : a.si...@mailbox.org ***************************************************************************/ @@ -157,6 +157,8 @@ resultOfHook(false), lineContainedTestCase(false), applySyntaxTestCase(false), + toggleDynRawString(false), + keywordCase ( StringTools::CASE_UNCHANGED ), eolDelimiter ('\n'), outputType ( type ) @@ -439,9 +441,8 @@ vector<int> overrideStyleAttrs=currentSyntax->getOverrideStyleAttributes(); docStyle.overrideAttributes(overrideStyleAttrs); if (overrideStyleAttrs.size()) - disableStyleCache = true; + disableStyleCache = true; } - } string CodeGenerator::getThemeInitError() @@ -547,19 +548,12 @@ regexGroups.insert ( make_pair ( matchBegin + 1, ReGroup ( regexElem->open, cur->length(groupID), regexElem->kwClass, regexElem->langName ) ) ); - - //Only return first match - //if (regexElem->kwClass==6) - // break; // priority regex (match required) if (regexElem->priority) { return; } - } - - // prio check here if match not necessary } } @@ -632,10 +626,9 @@ if ( c==' ' || c=='\t' ) { token= c; - return _WS; + return _WS; // White space } - - //TODO add control flag + if ( applySyntaxTestCase && ( c=='^' || c=='<') && (oldState == ML_COMMENT || oldState==SL_COMMENT) ) { token= c; return _TESTPOS; @@ -710,6 +703,21 @@ resultOfHook = res.size()>=1; if (resultOfHook) { + + // test balloon + if (currentSyntax->requiresParamUpdate()) { + + if ( currentSyntax->getOverrideConfigVal("state.string.raw")=="true"){ + toggleDynRawString=true; // reset to false in string state fct + } + if ( currentSyntax->getOverrideConfigVal("format.maskws")=="true") { + maskWs=true; + } + if ( currentSyntax->getOverrideConfigVal("format.spacer").size()) { + spacer=currentSyntax->getOverrideConfigVal("format.spacer"); + } + } + State validatedState = (State)res[0].asInteger(); if ( validatedState== _REJECT) { // proceed using only the first character of the token @@ -727,6 +735,7 @@ } return oldState; } + stateTrace.push_back(validatedState); if (stateTrace.size()>200) stateTrace.erase(stateTrace.begin(), stateTrace.begin() + 100 ); return validatedState; @@ -770,8 +779,7 @@ } if (stateTraceCurrent.size()>200) stateTraceCurrent.erase(stateTraceCurrent.begin(), stateTraceCurrent.begin() + 100 ); - } - + } } @@ -1717,8 +1725,8 @@ State state=STANDARD; - if (outputType!=ESC_TRUECOLOR && outputType!=ESC_XTERM256) - openTag ( STANDARD ); + //if (outputType!=ESC_TRUECOLOR && outputType!=ESC_XTERM256) + openTag ( STANDARD ); do { // determine next state @@ -1793,10 +1801,10 @@ processWsState(); break; default: - - // breaks Unicode sequences: - // if ((outputType==ESC_TRUECOLOR || outputType==ESC_XTERM256) && token.size()) - // openTag ( STANDARD ); + + // see https://gitlab.com/saalen/highlight/-/issues/152 + // if (lineNumber==1 && lineIndex==1 && (outputType==ESC_TRUECOLOR || outputType==ESC_XTERM256) && token.size()) + // openTag ( STANDARD ); printMaskedToken (); break; @@ -2121,7 +2129,7 @@ string openDelim=token; //Raw String by definition: - bool isRawString=currentSyntax->delimiterIsRawString(openDelimID); + bool isRawString=currentSyntax->delimiterIsRawString(openDelimID) || toggleDynRawString; // Test if character before string open delimiter token equals to the // raw string prefix (Example: r" ", r""" """ in Python) @@ -2194,7 +2202,9 @@ } while ( !exitState && !eof ); closeTag ( myState ); - + + toggleDynRawString = false; + return eof; } @@ -2338,15 +2348,15 @@ void CodeGenerator::flushWs(int arg) { - PositionState ps(currentState, 0, true); - //workaround condition - for ( size_t i=0; i<wsBuffer.size() && ((arg > 3) || ( (arg<4) && lineIndex>1)) && applySyntaxTestCase ; i++ ) { + PositionState ps(currentState, 0, true); + //workaround condition + for ( size_t i=0; i<wsBuffer.size() && ((arg > 3) || ( (arg<4) && lineIndex>1)) && applySyntaxTestCase ; i++ ) { stateTraceCurrent.push_back(ps); //std::cerr <<"\nflush >"<<wsBuffer<<"< arg:"<<arg; } - //fix canvas whitespace - if (outputType==ESC_XTERM256 || outputType==ESC_TRUECOLOR){ + //fix canvas whitespace + if (wsBuffer.length() && (outputType==ESC_XTERM256 || outputType==ESC_TRUECOLOR) ){ *out<< maskWsBegin; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/core/platform_fs.cpp new/highlight-3.57/src/core/platform_fs.cpp --- old/highlight-3.56/src/core/platform_fs.cpp 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/core/platform_fs.cpp 2020-05-14 21:44:20.000000000 +0200 @@ -256,8 +256,8 @@ return; } - // skip hidden or read only - if ( entry->d_name[0] == '.' || ! ( statbuf.st_mode & S_IWUSR ) ) + // skip hidden + if ( entry->d_name[0] == '.' ) continue; // if a sub directory and recursive, save sub directory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/core/syntaxreader.cpp new/highlight-3.57/src/core/syntaxreader.cpp --- old/highlight-3.56/src/core/syntaxreader.cpp 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/core/syntaxreader.cpp 2020-05-14 21:44:20.000000000 +0200 @@ -2,7 +2,7 @@ syntaxreader.cpp - description ------------------- begin : Wed Nov 28 2001 - copyright : (C) 2001-2018 by Andre Simon + copyright : (C) 2001-2020 by Andre Simon email : a.si...@mailbox.org ***************************************************************************/ @@ -64,6 +64,7 @@ allowNestedComments ( true ), reformatCode ( false ), assertEqualLength(false), + paramsNeedUpdate(false), rawStringPrefix(0), continuationChar(0), validateStateChangeFct(NULL), @@ -171,6 +172,7 @@ lua_register (ls.getState(), "AddKeyword", luaAddKeyword); lua_register (ls.getState(), "RemoveKeyword", luaRemoveKeyword); lua_register (ls.getState(), "AddPersistentState", luaAddPersistentState); + lua_register (ls.getState(), "OverrideParam", luaOverrideParam); SyntaxReader **s = (SyntaxReader **)lua_newuserdata(ls.getState(), sizeof(SyntaxReader *)); *s=this; @@ -232,11 +234,7 @@ if (ls["Keywords"][idx]["Priority"].value()!=Diluculum::Nil) { priority=ls["Keywords"][idx]["Priority"].value().asInteger(); } - - //string semantics; - //if (ls["Keywords"][idx]["Semantics"].value()!=Diluculum::Nil) - // constraintFilename =ls["Keywords"][idx]["Semantics"].value().asString(); - + unsigned int constraintLineNum=0; string constraintFilename, semanticDescription; if (ls["Keywords"][idx]["Constraints"].value()!=Diluculum::Nil) { @@ -251,6 +249,7 @@ idx++; } + /* if (globals.count("GeneratorOverride")) { idx=1; Diluculum::LuaValue lVal = ls["GeneratorOverride"][idx].value(); @@ -259,7 +258,7 @@ idx++; lVal = ls["GeneratorOverride"][idx].value(); } - } + }*/ if (globals.count("KeywordFormatHints")) { idx=1; @@ -512,6 +511,31 @@ return 1; } + +void SyntaxReader::overrideParam(const string& name, const string& val) +{ + pluginConfigOverride[name] = val; + paramsNeedUpdate=true; +} + + +int SyntaxReader::luaOverrideParam (lua_State *L) +{ + int retVal=0; + if (lua_gettop(L)==2) { + const char* name = lua_tostring(L, 1); + const char* val = lua_tostring(L, 2); + lua_getglobal(L, GLOBAL_SR_INSTANCE_NAME); + SyntaxReader **a=reinterpret_cast<SyntaxReader **>(lua_touserdata(L, 3)); + if (*a) { + (*a)->overrideParam(name, val); + retVal=1; + } + } + lua_pushboolean(L, retVal); + return 1; +} + void SyntaxReader::restoreLangEndDelim(const string& langPath) { if ( !langPath.empty()&& nestedStateEndDelimiters.count(langPath) ) { @@ -662,6 +686,12 @@ return persistentSyntaxDescriptions.count(langDesc)>0; } +bool SyntaxReader::requiresParamUpdate(){ + bool ret = paramsNeedUpdate; + paramsNeedUpdate = false; + return ret; +} + void SyntaxReader::clearPersistentSnippets() { persistentSyntaxDescriptions.clear(); persistentSnippets.clear(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/core/xterm256generator.cpp new/highlight-3.57/src/core/xterm256generator.cpp --- old/highlight-3.56/src/core/xterm256generator.cpp 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/core/xterm256generator.cpp 2020-05-14 21:44:20.000000000 +0200 @@ -2,7 +2,7 @@ xterm256generator.cpp - description ------------------- begin : Oct 13 2006 - copyright : (C) 2006-2018 by Andre Simon + copyright : (C) 2006-2020 by Andre Simon email : a.si...@mailbox.org ***************************************************************************/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/gui-qt/mainwindow.cpp new/highlight-3.57/src/gui-qt/mainwindow.cpp --- old/highlight-3.56/src/gui-qt/mainwindow.cpp 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/gui-qt/mainwindow.cpp 2020-05-14 21:44:20.000000000 +0200 @@ -44,6 +44,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindowClass), oldThemeIndex(0), getDataFromCP(false), runFirstTime(true) { + ui->setupUi(this); this->setWindowTitle(QString("Highlight %1").arg( HIGHLIGHT_VERSION)); @@ -160,13 +161,46 @@ //avoid ugly buttons in MacOS #ifndef Q_OS_OSX - ui->pbPluginReadFilePath->setMaximumWidth(30); - ui->pbOutputDest->setMaximumWidth(30); - ui->pbHTMLChooseStyleIncFile->setMaximumWidth(30); - ui->pbLATEXChooseStyleIncFile->setMaximumWidth(30); - ui->pbTEXChooseStyleIncFile->setMaximumWidth(30); - ui->pbSVGChooseStyleIncFile->setMaximumWidth(30); - ui->tabIOSelection->setDocumentMode(false); + ui->pbPluginReadFilePath->setMaximumWidth(30); + ui->pbOutputDest->setMaximumWidth(30); + ui->pbHTMLChooseStyleIncFile->setMaximumWidth(30); + ui->pbLATEXChooseStyleIncFile->setMaximumWidth(30); + ui->pbTEXChooseStyleIncFile->setMaximumWidth(30); + ui->pbSVGChooseStyleIncFile->setMaximumWidth(30); + ui->tabIOSelection->setDocumentMode(false); + #endif + + #ifdef Q_OS_WIN + // https://forum.qt.io/topic/101391/windows-10-dark-theme/ + if (QSysInfo::productVersion()=="10") { + QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",QSettings::NativeFormat); + if(settings.value("AppsUseLightTheme")==0){ + qApp->setStyle(QStyleFactory::create("Fusion")); + QPalette darkPalette; + QColor darkColor = QColor(45,45,45); + QColor disabledColor = QColor(127,127,127); + darkPalette.setColor(QPalette::Window, darkColor); + darkPalette.setColor(QPalette::WindowText, Qt::white); + darkPalette.setColor(QPalette::Base, QColor(18,18,18)); + darkPalette.setColor(QPalette::AlternateBase, darkColor); + darkPalette.setColor(QPalette::ToolTipBase, Qt::white); + darkPalette.setColor(QPalette::ToolTipText, Qt::white); + darkPalette.setColor(QPalette::Text, Qt::white); + darkPalette.setColor(QPalette::Disabled, QPalette::Text, disabledColor); + darkPalette.setColor(QPalette::Button, darkColor); + darkPalette.setColor(QPalette::ButtonText, Qt::white); + darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, disabledColor); + darkPalette.setColor(QPalette::BrightText, Qt::red); + darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); + + darkPalette.setColor(QPalette::Highlight, QColor(153, 153, 153)); + darkPalette.setColor(QPalette::HighlightedText, Qt::black); + darkPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, disabledColor); + + qApp->setPalette(darkPalette); + qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #404040; border: 1px solid white; }"); + } + } #endif QObject::connect(ui->pbOpenFiles, SIGNAL(clicked()), this, SLOT(openFiles())); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/gui-qt/mainwindow.h new/highlight-3.57/src/gui-qt/mainwindow.h --- old/highlight-3.56/src/gui-qt/mainwindow.h 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/gui-qt/mainwindow.h 2020-05-14 21:44:20.000000000 +0200 @@ -56,6 +56,7 @@ #include <QTextStream> #include <QFileSystemWatcher> #include <QDesktopServices> +#include <QStyleFactory> #include "version.h" #include "codegenerator.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/include/codegenerator.h new/highlight-3.57/src/include/codegenerator.h --- old/highlight-3.56/src/include/codegenerator.h 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/include/codegenerator.h 2020-05-14 21:44:20.000000000 +0200 @@ -822,7 +822,6 @@ /** Flag if wrapped lines should receive unique line numbers as well */ bool numberWrappedLines; - /** indicator if current state was set by Lua hook function */ bool resultOfHook; @@ -830,6 +829,8 @@ bool applySyntaxTestCase; + bool toggleDynRawString; + /** flag which determines keyword output (unchangeed, uppercase, lowercase)*/ StringTools::KeywordCase keywordCase; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/include/syntaxreader.h new/highlight-3.57/src/include/syntaxreader.h --- old/highlight-3.56/src/include/syntaxreader.h 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/include/syntaxreader.h 2020-05-14 21:44:20.000000000 +0200 @@ -260,6 +260,9 @@ bool allowsInnerSection(const string& langPath); bool requiresTwoPassRun(); + + bool requiresParamUpdate(); + string getPersistentHookConditions(); @@ -432,7 +435,9 @@ reformatCode, // string open and close delimiters must have the same length - assertEqualLength; + assertEqualLength, + + paramsNeedUpdate; // character which is prefix of raw string (c#) unsigned char rawStringPrefix; @@ -450,12 +455,17 @@ static int luaAddPersistentState (lua_State *L); + static int luaOverrideParam (lua_State *L); + // generate a keyword class unsigned int generateNewKWClass ( int classID ); void addKeyword(unsigned int groupID, const string& kw); void removeKeyword(const string& kw); + + void overrideParam(const string& name, const string& val); + // Functions accessible in Lua State Diluculum::LuaFunction* validateStateChangeFct; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/src/include/version.h new/highlight-3.57/src/include/version.h --- old/highlight-3.56/src/include/version.h 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/src/include/version.h 2020-05-14 21:44:20.000000000 +0200 @@ -29,7 +29,7 @@ #define VERSION_H #define HIGHLIGHT_MAJOR "3" -#define HIGHLIGHT_MINOR "56" +#define HIGHLIGHT_MINOR "57" #define HIGHLIGHT_VERSION HIGHLIGHT_MAJOR "." HIGHLIGHT_MINOR diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlight-3.56/themes/nord.theme new/highlight-3.57/themes/nord.theme --- old/highlight-3.56/themes/nord.theme 2020-04-07 20:17:39.000000000 +0200 +++ new/highlight-3.57/themes/nord.theme 2020-05-14 21:44:20.000000000 +0200 @@ -13,7 +13,7 @@ BlockComment = { Colour="#4c566a" } LineComment = { Colour="#4c566a" } PreProcessor = { Colour="#5e81ac" } -LineNum = { Colour="#303030" } +LineNum = Default Operator = { Colour="#81a1c1" } Interpolation = { Colour="#ebcb8b" }