ricardoboss / Prolangle

A game about programming languages.
https://prolangle.ricardoboss.de
MIT License
2 stars 1 forks source link

Snippet highlighting #89

Open chucker opened 8 months ago

chucker commented 8 months ago

This technically works:

image

image

image

However, one weakness is that the highlighter doesn't get context from the concealed code. Progle even goes so far as to highlight the concealed characters. We can't do that with this design.

What we probably should do instead is retrieve "what would it have highlighted?" back, then conceal it.

ricardoboss commented 8 months ago

Update me?

ricardoboss commented 8 months ago

This PR is still a draft. Should I review regardless?

chucker commented 8 months ago

If you're OK with a highlighter that (unlike Progle's) only works on visible text, I can rebase this. Otherwise, we need a new approach first.

ricardoboss commented 8 months ago

It seems like the highlighter can not always highlight the revealed snippet: image

So, the highlighting in its current form is only helpful sometimes? Maybe we should try a new approach.