Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting with multiline REPL input #263

Open
gdalle opened this issue Sep 19, 2023 · 4 comments
Open

Syntax highlighting with multiline REPL input #263

gdalle opened this issue Sep 19, 2023 · 4 comments

Comments

@gdalle
Copy link

gdalle commented Sep 19, 2023

Source code:

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

```>
fact(30)
```

image

Keywords are not highlighted beyond line 1

@gdalle gdalle changed the title Syntax highlighting when defining a function in a REPL block Syntax highlighting with multiline REPL input Sep 19, 2023
@tlienart
Copy link
Owner

tlienart commented Sep 19, 2023

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
Copy link
Author

gdalle commented Sep 19, 2023

Integer overflow is the thing I want to demonstrate here 🤣

@adrhill
Copy link

adrhill commented Dec 3, 2024

Possibly related to JuliaEditorSupport/atom-language-julia#282?

@adrhill
Copy link

adrhill commented Dec 3, 2024

A lot of julia-repl code highlighter fall back to this regex, which appears to be broken.
Maybe this isn't too surprising given the comment on line 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants