Skip to content

Need help getting raw line to work #3958

Discussion options

You must be logged in to vote

What exactly are you trying to do with raw.line? Are you trying to highlight the "system" text in the first 3 lines?

You can't use raw.line that way, though you can modify it with show rules. I managed to highlight the first three "System" occurrences using the following code:

#{
 show raw.line: it => if it.number <= 3 {
   show "System": set text(blue)
   it
 } else {
   it
 }
raw(
 read("./CSharp_Example_File.cs"),
 lang: "cs",
 )
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lettuceDestroyer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants