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

Should not panic on unrecognized source language #719

Closed
gdamore opened this issue Jul 12, 2020 · 0 comments · Fixed by #720
Closed

Should not panic on unrecognized source language #719

gdamore opened this issue Jul 12, 2020 · 0 comments · Fixed by #720
Assignees
Milestone

Comments

@gdamore
Copy link
Collaborator

gdamore commented Jul 12, 2020

If I set a source language in a document that chroma does not have builtin support for, a nil lexer is returned, and the result is a panic.

Instead we should fall back to Chroma's fallback lexer.

@gdamore gdamore self-assigned this Jul 12, 2020
@gdamore gdamore added this to the v0.5.0 milestone Jul 12, 2020
@gdamore gdamore changed the title Should not panic on recognized source language Should not panic on unrecognized source language Jul 12, 2020
gdamore added a commit to gdamore/libasciidoc that referenced this issue Jul 12, 2020
This fixes three separate issues (it was natural to fix them all
at the same time).

Fixes bytesparadise#719 Should not panic on unrecognized source language
Fixes bytesparadise#706 Support "Chroma" as a syntax highlighter choice
Fixes bytesparadise#704 Source paragraph does not honor syntax highlighter
xcoulon pushed a commit that referenced this issue Jul 12, 2020
This fixes three separate issues (it was natural to fix them all
at the same time).

Fixes #719 Should not panic on unrecognized source language
Fixes #706 Support "Chroma" as a syntax highlighter choice
Fixes #704 Source paragraph does not honor syntax highlighter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant