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