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

enh(csharp) Add all v9 keywords, and other missing keywords #2679

Merged
merged 5 commits into from Sep 10, 2020
Merged

enh(csharp) Add all v9 keywords, and other missing keywords #2679

merged 5 commits into from Sep 10, 2020

Conversation

IEvangelist
Copy link
Contributor

Hi 👋🏼 highlight.js friends!

I'd like to introduce several new C# keywords. These are being added as part of C# 9.

  • Added C# 9 keywords
    • init
    • record
    • and
    • not
    • or
    • nint
    • nunit
    • with
  • Added other missing keywords (i.e.; default as literal, etc.)
  • Improved organization
  • Added built_in keywords

See our official docs: https://docs.microsoft.com/dotnet/csharp/whats-new/csharp-9

@joshgoebel
Copy link
Member

Very nice.

@IEvangelist
Copy link
Contributor Author

Very nice.

Hi again @joshgoebel - thank you very much! I've fixed all the broken tests that I caused, this should be good to go now. Thanks again.

@IEvangelist
Copy link
Contributor Author

Hi @joshgoebel - assuming this gets merged, how long until it is published as an official package update?

@Youssef1313
Copy link
Contributor

@IEvangelist FYI, if you're asking to get this on the official docs, I think docs uses this fork, so the fork needs to first get updated with upstream. (there should be additional steps which I don't know)

@IEvangelist
Copy link
Contributor Author

@IEvangelist FYI, if you're asking to get this on the official docs, I think docs uses this fork, so the fork needs to first get updated with upstream. (there should be additional steps which I don't know)

Hi @Youssef1313 - I'm familiar with that and in fact, we're trying to evaluate potentially reverting back to using this primary fork. Hence the reason why I'm focusing on adding some updates here. The fork has about 650 delta-commits, and we've added a ton of custom languages. We are exploring the extension model to see if we could plug in and revert back.

@Youssef1313
Copy link
Contributor

That sounds great! Thanks for letting me know.

@joshgoebel joshgoebel changed the title Add all C# 9 keywords, and other missing keywords enh(csharp) Add all v9 keywords, and other missing keywords Sep 10, 2020
@joshgoebel
Copy link
Member

assuming this gets merged, how long until it is published as an official package update?

We do minor releases every 45 days or so and we just did a release.

@joshgoebel joshgoebel merged commit d7b1ede into highlightjs:master Sep 10, 2020
@IEvangelist IEvangelist deleted the add-csharp-9-keywords branch September 10, 2020 19:05
@Duncanma
Copy link

That sounds great! Thanks for letting me know.

Hey @Youssef1313 and @joshgoebel , right now we build a subset of languages into a single version of highlight.js that we use on Docs, including some of our custom ones. In the V10 world, with those languages stored elsewhere, is there a build command/process for producing that same single highlight.js file? I was looking at https://highlightjs.readthedocs.io/en/latest/building-testing.html, but didn't see any mention of 3rd party hosted language syntaxes

@joshgoebel
Copy link
Member

joshgoebel commented Sep 10, 2020

@DuncanmaMSFT See the 3rd_party_quickstart. The normal build process will "just work" if additional language libraries are checked out out into extra inside of the HLJS folder.

If you just wanted to hack it you might create a structure like:

extra/ALL/src/languages/[dump all your language files here]

They'll likely need to be ES6 modules now of course, etc. It's also possible symlinks might work, but that's never been tested.

@joshgoebel
Copy link
Member

@DuncanmaMSFT And no more IE11 with version 10 of course.

@Duncanma
Copy link

@DuncanmaMSFT And no more IE11 with version 10 of course.

Thanks @joshgoebel , for both responses, this is great. The IE11 issue isn't necessarily a blocker for us, since the code snippets would still be there and the page would work, it just wouldn't be syntax highlighted and that doesn't seem like a blocker for that specific browser (< 5% of our traffic all up, but < 2% in an area of the site like /dotnet/)

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

Successfully merging this pull request may close these issues.

None yet

4 participants