Skip to content

Conversation

@Ahattalla
Copy link
Contributor

Description

I have fixed the issue of not highlighting text of files with c++ extensions by changing the url given to the method that returns the CodeLanguage to be with cpp extension to correctly recognize it,
I think there would be a better solution to add c++ extension to extensions on the init at CodeLanguage on CodeEditLanguages package.

 /// A language structure for `C++` staticletcpp:CodeLanguage=.init( id:.cpp, tsName:"cpp", extensions:["cc","cpp","hpp","h"], parentURL:CodeLanguage.c.queryURL, highlights:["injections"])

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screenshot 2023-08-14 at 11 48 28 PM
Screenshot 2023-08-14 at 11 48 47 PM

@thecoolwinter
Copy link
Collaborator

Thanks for fixing this! You're right though that adding the c++ extension to the languages packages would be preferable. That package is also open source here and if you want to make a PR there adding the extension to the language definition I'll approve it.

Copy link
Collaborator

@thecoolwinterthecoolwinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

@Ahattalla
Copy link
ContributorAuthor

Ahattalla commented Aug 16, 2023

Thanks for fixing this! You're right though that adding the c++ extension to the languages packages would be preferable. That package is also open source here and if you want to make a PR there adding the extension to the language definition I'll approve it.

I have made a pr on the package here, could you please approve it? @thecoolwinter

@Ahattalla
Copy link
ContributorAuthor

By merging this pr this issue #1404 is solved and can be closed, but first CodeEditLanguages package needs to add new release with the issue solved to be reflected in CodeEdit project

Thanks for helping me through this, I will close this pr
@thecoolwinter

@AhattallaAhattalla deleted the fix-code-highlights-incorrectly-disabled-on-files-with-extension-name-.c++ branch August 18, 2023 21:06
@austincondiff
Copy link
Collaborator

Thanks @Ahattalla, I will close it!

@allcontributors add @Ahattalla for code

@allcontributors
Copy link
Contributor

@austincondiff

I've put up a pull request to add @Ahattalla! 🎉

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Code highlights incorrectly disabled on files with extension name '.c++'

3 participants

@Ahattalla@thecoolwinter@austincondiff