fix: handle symbol in validateLanguageOptions - #722
Open
lumirlumir wants to merge 1 commit into
Open
Conversation
Contributor
|
The JS, CSS and JSON language do not have the problem as they do not print the value. |
DMartens
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request?
Which language are you using?
CommonMark and GFM.
What did you do?
When I use
MarkdownLanguage#validateLanguageOptionswith asymbolvalue, it produces an incorrect error message.What did you expect to happen?
I expected the error message to be:
What actually happened?
However, I got:
'Cannot convert a Symbol value to a string'Link to Minimal Reproducible Example
Create a
test.jsfile in the root of themarkdownproject.What changes did you make? (Give an overview)
This is a simple bug fix. I’ve coerced the message variable with
Stringso that it can also handle an incorrectly passedsymbolvalue.This is a subtle edge case, but I noticed it while working on #706.
Related Issues
N/A
Is there anything you'd like reviewers to focus on?
I’ve verified that the JSON and CSS language plugins don’t have this type of issue.