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

Weird syntax highlighting #111

Open
markvincze opened this issue Aug 4, 2017 · 1 comment
Open

Weird syntax highlighting #111

markvincze opened this issue Aug 4, 2017 · 1 comment

Comments

@markvincze
Copy link

I encountered a strange problem with syntax highlighting: I have an almost identical code sample on two consecutive slides, both of them defines a record type, but the second one is also using the mutable keyword. And the coloring of the two samples are pretty different.

The first one:
image

The second:
image

Has anyone encountered something similar before? Can I simply hook in either a different syntax coloring library, or use a different theme for just the code?

Or this is completely unrelated from FsReveal, and I should ask this on the highlightJs page instead?

@danyx23
Copy link

danyx23 commented Nov 18, 2017

I had this too in a more drastic way with Elm code. E.g. http://danielbachler.de/goto-berlin-elm/#/0/10 and http://danielbachler.de/goto-berlin-elm/#/0/11 are Elm code with and without type annotations, one is colored and the other not. Later on there are cases where syntax highlighting failed with examples where there were type annotations present. I tried updating the highlight.js script inside the fsreveal library to a newer version and that improved the syntax highlighting but a lot of the errors are still there. I haven't had the time yet to investigate but there is definitely something weird going on. The next step should IMHO be to figure out if highlight.js alone would correctly format these snippets and if it would still do so if it is used on a static page where two code blocks are formatted in turn (to check if there is some state in highlight.js that is maybe not correctly reset between formatting calls).

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

2 participants