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
|
$sLastCode = sCode
|
||||||
|
|
||||||
Do
|
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)
|
sCode = Mid$(sCode, InStr(sCode, " ") + 1)
|
||||||
Else
|
Else
|
||||||
Break
|
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["webpage"].ToHTML(File.Load(Application.Path &/ ".hidden/test/Webpage1.webpage")))
|
||||||
'File.Save("~/test.html", TextHighlighter["sh"].ToHTML(File.Load("~/gambas/git/master/acinclude.m4")))
|
'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
|
End
|
||||||
|
|
|
@ -233,7 +233,7 @@ Static Private Sub CreateCustomHighlighter(sHighlight As String, sPath As String
|
||||||
iLine = 0
|
iLine = 0
|
||||||
|
|
||||||
CState.Print()
|
CState.Print()
|
||||||
CState.Print("Private Sub Compile(aState as Byte[])")
|
CState.Print("Private Sub Compile(aState As Byte[])")
|
||||||
CState.Print()
|
CState.Print()
|
||||||
CState.Print("Dim sWord, sSymbol As String")
|
CState.Print("Dim sWord, sSymbol As String")
|
||||||
CState.Print("Dim I As Integer")
|
CState.Print("Dim I As Integer")
|
||||||
|
|
|
@ -5,23 +5,25 @@ block{Operator}:
|
||||||
block.comment{Comment}:
|
block.comment{Comment}:
|
||||||
from /* to */
|
from /* to */
|
||||||
identifier{Normal}:
|
identifier{Normal}:
|
||||||
match \$(IDENT)\
|
match /$(IDENT)/
|
||||||
property{Operator}:
|
property{Operator}:
|
||||||
from : to ;
|
from : to ;
|
||||||
|
color{Constant}:
|
||||||
|
match /#[0-9A-Fa-f]{6}/
|
||||||
|
match /#[0-9A-Fa-f]{3}/
|
||||||
|
number:
|
||||||
|
match /$(NUMBER)/
|
||||||
|
unit{Function}:
|
||||||
|
match /$(IDENT)/
|
||||||
important:
|
important:
|
||||||
match "!important"
|
match "!important"
|
||||||
identifier{Keyword}:
|
identifier{Keyword}:
|
||||||
match \$(IDENT)\
|
match /$(IDENT)/
|
||||||
symbol %
|
symbol %
|
||||||
number:
|
|
||||||
match \$(NUMBER)\
|
|
||||||
string:
|
string:
|
||||||
from " to "
|
from " to "
|
||||||
from ' to '
|
from ' to '
|
||||||
string.escape{Escape}:
|
string.escape{Escape}:
|
||||||
match \$(ESCAPE)\
|
match /$(ESCAPE)/
|
||||||
color{Constant}:
|
|
||||||
match \#[0-9A-Fa-f]{6}\
|
|
||||||
match \#[0-9A-Fa-f]{3}\
|
|
||||||
operator:
|
operator:
|
||||||
symbol ( ) ,
|
symbol ( ) ,
|
||||||
|
|
Loading…
Reference in a new issue