@li_haoyi Do you have any [Scala]JS code which syntax-highlights Scala code in a browser? Seems like you would have all the jigsaw pieces...
-
Show this thread
-
Looks like there are a couple of general highlighting libs which do it, but I wouldn't trust them to correctly read some of the code I have.
1 reply 0 retweets 0 likesShow this thread -
Replying to @propensive
https://github.com/lihaoyi/Ammonite/blob/master/amm/repl/src/main/scala/ammonite/repl/Highlighter.scala … should be fully Scala.js compatible and be trivially retargetable to emit HTML instead of ANSI colors
1 reply 0 retweets 3 likes -
Replying to @li_haoyi
Cool, thank you. When you linked me to Ammonite, I assumed it was a bunch of work, but from that source, it appears quite doable.
1 reply 0 retweets 0 likes -
Replying to @propensive
I mean “trivially” in the real sense, not the academic one :p Should take me 10 min to swap it over, someone less familiar maybe 1 hour
2 replies 0 retweets 0 likes -
Replying to @li_haoyi @propensive
Could even do it purely within flattenIndices if you didnt mind a bit of hackiness. Just pattern match on the fansi.Attrs assigned below
1 reply 0 retweets 0 likes
I'll probably stick in my comfort zone and take a bit longer to avoid hackiness. ;)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.