tlienart / Xranklin.jl

Experimental repo for a refactoring of Franklin.jl
https://tlienart.github.io/Xranklin.jl
MIT License
40 stars 1 forks source link

Syntax highlighting with multiline REPL input #263

Open gdalle opened 12 months ago

gdalle commented 12 months ago

Source code:

```>
function fact(n)
    p = 1
    for i in 1:n
        p *= i
    end
    return p
end
fact(30)


![image](https://github.com/tlienart/Xranklin.jl/assets/22795598/e6d075c4-e2cf-4a48-8e8e-5565553c0a5e)

Keywords are not highlighted beyond line 1
tlienart commented 12 months ago

the funny thing is that I do see issues here but the one you mentioned is not the first one 😂

  1. the Main.__FRANKLIN__ should be scrubbed, there's logic to do this that doesn't get applied here, that's not good
  2. integer overflow or something 🤔
  3. keyword stuff

note that the highlighting is not handled by [XF]ranklin, so here it's a matter of figuring out why highlight.js doesn't like what it sees. I'll investigate (should also do #262 while I'm at it...)

gdalle commented 12 months ago

Integer overflow is the thing I want to demonstrate here :rofl: