Skip to content

Consensys/highlightjs-dafny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

highlightjs-dafny

Dafny language grammar definition for highlight.js.

Usage

Adapted from the "Usage" section of highlightjs-cypher.

Simply include the Highlight.js library in your webpage or Node app, then load this module.

Static website or simple usage

Simply load the module after loading Highlight.js. You'll use the minified version found in the dist directory. This module is just a CDN build of the language, so it will register itself as the Javascript is loaded.

<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" src="/path/to/highlightjs-dfny/dist/dafny.min.js"></script>
<script>hljs.highlightAll();</script>

This will find and highlight code inside of <pre><code> tags; it tries to detect the language automatically. If automatic detection doesn’t work for you, or you simply prefer to be explicit, you can specify the language manually in the using the class attribute:

<pre><code class="language-dafny">...</code></pre>

Using jsDelivr CDN

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/ConsenSys/highlightjs-dafny/dist/dafny.min.js"></script>

Other usages

For other usages see the official highlight.js documentation.

License

highlight-dafny is released under the Apache 2.0 license. See LICENSE file for details.

Author

Roberto Saltini

Maintainer

Roberto Saltini

Links

About

Dafny language grammar definition for highlight.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published