Fix 'css' highlighting.
[GB.HIGHLIGHT] * BUG: Fix 'css' highlighting.
This commit is contained in:
parent
ef01ebe758
commit
051111520b
5 changed files with 15 additions and 12 deletions
|
@ -144,7 +144,7 @@ Static Public Sub Print(Optional sCode As String)
|
|||
$sLastCode = sCode
|
||||
|
||||
Do
|
||||
If sCode Begins "Static " Or If sCode Begins "Private " Or If sCode Begins "Public " Then
|
||||
If sCode Begins "Static " Or If sCode Begins "Private " Or If sCode Begins "Public " Or If sCode Begins "Fast " Then
|
||||
sCode = Mid$(sCode, InStr(sCode, " ") + 1)
|
||||
Else
|
||||
Break
|
||||
|
|
|
@ -21,6 +21,7 @@ Public Sub Main()
|
|||
'File.Save("~/test.html", TextHighlighter["webpage"].ToHTML(File.Load(Application.Path &/ ".hidden/test/Webpage1.webpage")))
|
||||
'File.Save("~/test.html", TextHighlighter["sh"].ToHTML(File.Load("~/gambas/git/master/acinclude.m4")))
|
||||
|
||||
Print TextHighlighter["javascript"].ToANSI(File.Load("~/asap/omogen/master/src/kernel/guygle.cgi/javascript/selectr.js"))
|
||||
'Print TextHighlighter["javascript"].ToANSI(File.Load("~/asap/omogen/master/src/kernel/guygle.cgi/javascript/selectr.js"))
|
||||
Print TextHighlighter["css"].ToANSI(File.Load("~/asap/omogen/master/src/kernel/guygle.cgi/style/style-modern.css"))
|
||||
|
||||
End
|
||||
|
|
|
@ -233,7 +233,7 @@ Static Private Sub CreateCustomHighlighter(sHighlight As String, sPath As String
|
|||
iLine = 0
|
||||
|
||||
CState.Print()
|
||||
CState.Print("Private Sub Compile(aState as Byte[])")
|
||||
CState.Print("Private Sub Compile(aState As Byte[])")
|
||||
CState.Print()
|
||||
CState.Print("Dim sWord, sSymbol As String")
|
||||
CState.Print("Dim I As Integer")
|
||||
|
|
|
@ -5,23 +5,25 @@ block{Operator}:
|
|||
block.comment{Comment}:
|
||||
from /* to */
|
||||
identifier{Normal}:
|
||||
match \$(IDENT)\
|
||||
match /$(IDENT)/
|
||||
property{Operator}:
|
||||
from : to ;
|
||||
color{Constant}:
|
||||
match /#[0-9A-Fa-f]{6}/
|
||||
match /#[0-9A-Fa-f]{3}/
|
||||
number:
|
||||
match /$(NUMBER)/
|
||||
unit{Function}:
|
||||
match /$(IDENT)/
|
||||
important:
|
||||
match "!important"
|
||||
identifier{Keyword}:
|
||||
match \$(IDENT)\
|
||||
match /$(IDENT)/
|
||||
symbol %
|
||||
number:
|
||||
match \$(NUMBER)\
|
||||
string:
|
||||
from " to "
|
||||
from ' to '
|
||||
string.escape{Escape}:
|
||||
match \$(ESCAPE)\
|
||||
color{Constant}:
|
||||
match \#[0-9A-Fa-f]{6}\
|
||||
match \#[0-9A-Fa-f]{3}\
|
||||
match /$(ESCAPE)/
|
||||
operator:
|
||||
symbol ( ) ,
|
||||
|
|
|
@ -32,4 +32,4 @@ type{Keyword}:
|
|||
from ' to '
|
||||
operator:
|
||||
symbol > , +
|
||||
@include css.block
|
||||
@include css.block
|
||||
|
|
Loading…
Reference in a new issue