From dac542682d0e874936fcdb226822f53fed626711 Mon Sep 17 00:00:00 2001 From: Yash-Singh1 Date: Mon, 1 Nov 2021 19:43:54 -0700 Subject: [PATCH] More code fence syntax highlighting --- CONTRIBUTING.md | 10 +++++----- docs/CHANGELOG.md | 2 +- docs/Setup.md | 2 +- docs/development.md | 2 +- docs/newDiagram.md | 2 +- docs/theming.md | 2 +- docs/usage.md | 6 +++--- src/mermaidAPI.js | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d9bc67b0..d8440b1e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,13 +35,13 @@ The documentation is written in Markdown, for more information about Markdown [s If you want to preview the documentation site on your machine, you need to install `docsify-cli`: -``` +```sh $ npm i docsify-cli -g -```` +``` If you are more familiar with Yarn, you can use the following command: -``` +```sh $ yarn global add docsify-cli ``` @@ -50,7 +50,7 @@ If the installation is successful, the command `docsify` will be available in yo You can now run the following command to serve the documentation site: -``` +```sh $ docsify serve docs ``` @@ -85,7 +85,7 @@ The rendering tests are very straightforward to create. There is a function imgS When running in ci it will take a snapshot of the rendered diagram and compare it with the snapshot from last build and flag for review it if it differs. This is what a rendering test looks like: -``` +```javascript it('should render forks and joins', () => { imgSnapshotTest( ` diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 4caa8da8c..9e4bea2dd 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -24,7 +24,7 @@ Site-wide themes are still declared via `initialize` by site owners. Example of `Initalize` call setting `theme` to `base`: -```js +```javascript mermaidAPI.initialize({ 'securityLevel': 'loose', 'theme': 'base' }); diff --git a/docs/Setup.md b/docs/Setup.md index e7b2f8484..f80e2c289 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -1090,7 +1090,7 @@ Note: modifies options in-place Function that renders an svg with a graph from a chart definition. Usage example below. -```js +```javascript mermaidAPI.initialize({ startOnLoad:true }); diff --git a/docs/development.md b/docs/development.md index 899ef9dee..27898c143 100644 --- a/docs/development.md +++ b/docs/development.md @@ -78,7 +78,7 @@ When running in CI it will take a snapshot of the rendered diagram and compare i This is what a rendering test looks like: -``` +```js it('should render forks and joins', () => { imgSnapshotTest( ` diff --git a/docs/newDiagram.md b/docs/newDiagram.md index b1b5b8036..995bdaa5c 100644 --- a/docs/newDiagram.md +++ b/docs/newDiagram.md @@ -17,7 +17,7 @@ For instance: There are some jison specific sub steps here where the parser stores the data encountered when parsing the diagram, this data is later used by the renderer. You can during the parsing call a object provided to the parser by the user of the parser. This object can be called during parsing for storing data. -``` +```jison statement : 'participant' actor { $$='actor'; } | signal { $$='signal'; } diff --git a/docs/theming.md b/docs/theming.md index 552e23099..e4ed4bf75 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -12,7 +12,7 @@ Themes follow and build upon the Levels of Configuration and employ `directives` Site-wide themes are still declared via `initialize` by site owners. Example of `Initalize` call setting `theme` to `base`: -```js +```javascript mermaidAPI.initialize({ 'securityLevel': 'loose', 'theme': 'base' }); diff --git a/docs/usage.md b/docs/usage.md index c8a7a8e34..3b9138d8f 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -269,7 +269,7 @@ renderer.code = function (code, language) { Another example in coffeescript that also includes the mermaid script tag in the generated markup. -```js +```coffee marked = require 'marked' module.exports = (options) -> @@ -370,7 +370,7 @@ approach are: * mermaid.startOnLoad * mermaid.htmlLabels -```js +```javascript mermaid.startOnLoad = true; ``` @@ -401,7 +401,7 @@ To set some configuration via the mermaid object. The two parameters that are su * mermaid_config.startOnLoad * mermaid_config.htmlLabels -```js +```javascript mermaid_config.startOnLoad = true; ``` diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index a8a95f2c9..b4502ca25 100755 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -200,7 +200,7 @@ export const decodeEntities = function (text) { /** * Function that renders an svg with a graph from a chart definition. Usage example below. * - * ```js + * ```javascript * mermaidAPI.initialize({ * startOnLoad:true * });