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

Update highlight.js #1277

Merged
merged 2 commits into from
Jul 21, 2020
Merged

Update highlight.js #1277

merged 2 commits into from
Jul 21, 2020

Conversation

maniyar1
Copy link
Contributor

@maniyar1 maniyar1 commented Jul 9, 2020

Updates to 10.1.1, with support for new languages added to the common set (#1275).
Built with:
common languages + D, handlebars, haskell, julia, scala, x86asm, armasm, yaml
Size difference:
New highlight.js: 132KiB
Old highlight.js: 84KiB

New highlight.js compressed: 48KiB
Old highlight.js compressed: 36KiB
So on average each request will be 12KiB more data (total payload is around 800KiB from my test).

I went through and double-checked that I didn't drop any languages, but a second pair of eyes couldn't hurt.

Full language list:

    .properties
    C#
    Diff
    Json
    Less
    Nginx config
    Perl 
    Ruby
    Shell session
    YAML
    Apache
    C++
    Go
    Java
    Lua
    Objective-C
    Plain Text
    Rust
    Swift
    Bash
    C-like foundation
    HTML, XML
    JavaScript
    Makefile
    PHP
    Python
    SCSS
    TOML, also INI
    C
    CSS
    CoffeeScript
    HTTP
    Kotlin
    Markdown
    PHP Template
    Python REPL
    SQL
    Typescript
    D
    handlebars
    haskell
    julia
    scala
    x86asm
    armasm
    yaml

Updates to 10.1.1, with support for new languages added to the common set.
Built with:
common languages + D, handlebars, haskell, julia, scala, x86asm, armasm, yaml
Size difference:
New highlight.js: 132KiB
Old highlight.js: 84KiB
--
New highlight.js compressed: 48KiB
Old highlight.js compressed: 36KiB
@colman-humphrey
Copy link

It would be great to get R support if possible. Since this highlight update is (necessarily) replacing a block of code, would adding it to this PR be possible (instead of another block replacement)?

I think (could be wrong) that R is the most popular language not yet supported (after the above change)

@maniyar1
Copy link
Contributor Author

For me the easiest way would be to just regenerate the file, but it's pretty trivial to add R so I'll go ahead and add it in, surprised it's not in there already now that you mention it...

@colman-humphrey
Copy link

Thanks @maniyar1 !

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks!
Looks like there are some breaking changes here (https://github.com/highlightjs/highlight.js/blob/master/VERSION_10_BREAKING_CHANGES.md), but none of them seem relevant to me. The biggest one seems to be dropping IE11 support, but I don't think mdbook really works on that anyways.

@ehuss ehuss merged commit 303db0d into rust-lang:master Jul 21, 2020
@maniyar1 maniyar1 deleted the patch-1 branch July 21, 2020 21:22
@indiv0
Copy link

indiv0 commented Jul 24, 2020

Would it be possible to add lisp support as well?

Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
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.

4 participants