using System;

#pragma warning disable 414, 3021

/// <summary>Main task</summary>
async Task<int> AccessTheWebAsync()
{
    Console.WriteLine("Hello, World!");
    string urlContents = await getStringTask;
    return urlContents.Length;
}

language: ...

style: tomorrow

Get version 9.1.0

Usage

Contribute

@highlightjs

News

  1. Version 9.1.0

    New languages:

    New Styles:

    Improvements to existing languages and styles:

    • Handle return type annotations in Python
    • Allow shebang headers in Javascript
    • Support strings in Rust meta
    • Recognize struct as a class-level definition in Rust
    • Recognize b-prefixed chars and strings in Rust
    • Better numbers handling in Verilog
  2. Version 9.0.0

    The new major version brings a reworked styling system. Highlight.js now defines a limited set of highlightable classes giving a consistent result across all the styles and languages. You can read a more detailed explanation and background in the tracking issue that started this long process back in May.

    This change is backwards incompatible for those who uses highlight.js with a custom stylesheet. The new style guide explains how to write styles in this new world.

    Bundled themes have also suffered a significant amount of improvements and may look different in places, but all the things now consistent and make more sense. Among others, the Default style has got a refresh and will probably be tweaked some more in next releases. Please do give your feedback in our issue tracker.

    New languages in this release:

    Improvements to existing languages and styles:

    • ECMAScript 6 modules import now do not require closing semicolon.
    • ECMAScript 6 classes constructors now highlighted.
    • Template string support for Typescript, as for ECMAScript 6.
    • Scala case classes params highlight fixed.
    • Built-in names introduced in Julia v0.4 added by Kenta Sato.
    • Refreshed Default style.

    Other notable changes:

    • Web workers support added bu Jan Kühle.
    • We now have tests for compressed browser builds as well.
    • The building tool chain has been switched to node.js 4.x. and is now shamelessly uses ES6 features all over the place, courtesy of Jeremy Hull.
    • License added to non-compressed browser build.
  3. Version 8.9.1

    Some last-minute changes reverted due to strange bug with minified browser build:

    • Scala case classes params highlight fixed
    • ECMAScript 6 modules import now do not require closing semicolon
    • ECMAScript 6 classes constructors now highlighted
    • Template string support for Typescript, as for ECMAScript 6
    • License added to not minified browser build
  4. Version 8.9.0

    New languages:

    Notable fixes and improvements to existing languages:

    • Added abstract and namespace keywords to TypeScript by Daniel Rosenwasser
    • Added label support to Dockerfile by Ladislav Prskavec
    • Crystal highlighting improved by Tsuyusato Kitsune
    • Missing Swift keywords added by Nate Cook
    • Improve detection of C block comments
    • Scala case classes params highlight fixed
    • ECMAScript 6 modules import now do not require closing semicolon
    • ECMAScript 6 classes constructors now highlighted
    • Template string support for Typescript, as for ECMAScript 6

    Other notable changes:

    • License added to not minified browser build
  5. Version 8.8.0

    New languages:

    Notable fixes and improvements to existing languages:

    • JavaScript highlighting no longer fails with ES6 default parameters
    • Added keywords async and await to Python
    • PHP heredoc support improved
    • Allow preprocessor directives within C++ functions

    Other notable changes:

    • Change versions to X.Y.Z SemVer-compatible format
    • Added ability to build all targets at once
  6. Version 8.7

    New languages:

    New Styles:

    Notable fixes and improvements to existing languages:

    • Fix encoding of images when copied over in certain builds
    • Fix incorrect highlighting of the word "bug" in comments
    • Treat decorators different from matrix multiplication in Python
    • Fix traits inheritance highlighting in Rust
    • Fix incorrect document
    • Oracle keywords added to SQL language definition by Vadimtro
    • Postgres keywords added to SQL language definition by Benjamin Auder
    • Fix registers in x86asm being highlighted as a hex number
    • Fix highlighting for numbers with a leading decimal point
    • Correctly highlight numbers and strings inside of C/C++ macros
    • C/C++ functions now support pointer, reference, and move returns
  7. Version 8.6

    New languages:

    New Styles:

    Notable fixes and improvements to existing languages:

    • Multi-line raw strings from C++11 are now supported
    • Fix class names with dashes in HAML
    • The async keyword from ES6/7 is now supported
    • TypeScript functions handle type and parameter complexity better
    • We unified phpdoc/javadoc/yardoc etc modes across all languages
    • CSS .class selectors relevance was dropped to prevent wrong language detection
    • Images is now included to CDN build
    • Release process is now automated
  8. Version 8.5

    New languages:

    New Styles:

    Notable fixes and improvements to existing languages:

    • ES6 features in JavaScript are better supported now by Gu Yiling.
    • Swift now recognizes body-less method definitions.
    • Single expression functions def foo, do: ... now work in Elixir.
    • More uniform detection of built-in classes in Objective C.
    • Fixes for number literals and processor directives in Rust.
    • HTML <script> tag now allows any language, not just JavaScript.
    • Multi-line comments are supported now in MatLab.
  9. Version 8.4

    We've got the new demo page! The obvious new feature is the new look, but apart from that it's got smarter: by presenting languages in groups it avoids running 10000 highlighting attempts after first load which was slowing it down and giving bad overall impression. It is now also being generated from test code snippets so the authors of new languages don't have to update both tests and the demo page with the same thing.

    Other notable changes:

    • The template_comment class is gone in favor of the more general comment.
    • Number parsing unified and improved across languages.
    • C++, Java and C# now use unified grammar to highlight titles in function/method definitions.
    • The browser build is now usable as an AMD module, there's no separate build target for that anymore.
    • OCaml has got a comprehensive overhaul by Mickaël Delahaye.
    • Clojure's data structures and literals are now highlighted outside of lists and we can now highlight Clojure's REPL sessions.

    New languages:

  10. Version 8.3

    We streamlined our tool chain, it is now based entirely on node.js instead of being a mix of node.js, Python and Java. The build script options and arguments remained the same, and we've noted all the changes in the documentation. Apart from reducing complexity, the new build script is also faster from not having to start Java machine repeatedly. The credits for the work go to Jeremy Hull.

    Some notable fixes:

    • PHP and JavaScript mixed in HTML now live happily with each other.
    • JavaScript regexes now understand ES6 flags "u" and "y".
    • throw keyword is no longer detected as a method name in Java.
    • Fixed parsing of numbers and symbols in Clojure thanks to input from Ivan Kleshnin.

    New languages in this release: