feat: Add support for highlighting comments in GUI
This commit is contained in:
@@ -211,6 +211,9 @@ html, body{
|
||||
::highlight(cbsdisplay) {
|
||||
@apply text-cyan-500;
|
||||
}
|
||||
::highlight(comment) {
|
||||
color: var(--risu-theme-textcolor2);
|
||||
}
|
||||
|
||||
::highlight(decorator) {
|
||||
color: var(--risu-theme-draculared);
|
||||
|
||||
@@ -210,6 +210,10 @@ function simpleCBSHighlightParser(node:Node,text:string){
|
||||
}
|
||||
}
|
||||
|
||||
if(upString.startsWith('// ')){
|
||||
highlightMode[depth] = 4
|
||||
}
|
||||
|
||||
colorHighlight()
|
||||
}
|
||||
}
|
||||
@@ -229,6 +233,9 @@ function simpleCBSHighlightParser(node:Node,text:string){
|
||||
case 3:
|
||||
ranges.push([range, 'deprecated'])
|
||||
break;
|
||||
case 4:
|
||||
ranges.push([range, 'comment'])
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user