Skip to content

Commit 0a9699c

Browse files
committed
README: Syntax highlighting for JS example
1 parent 5466491 commit 0a9699c

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,18 @@ Diff between two versions of a graph stored in git
4545

4646
fbp-diff also provides a JavaScript API.
4747

48-
var fbpDiff = require('fbp-diff');
49-
var options = {
50-
// fromFormat: 'object', // don't parse fromGraph, it is a JS object of a graph (default)
51-
// toFormat: 'json', // parse toGraph .json format
52-
format: 'fbp' // specify toFormat and fromFormat in one go
53-
};
54-
var fromGraph = "'hello' -> concat(Concatinator)\n'world' -> concat -> IN (Print)";
55-
var toGraph = "'hello' -> IN (Print)";
56-
var diff = fbpDiff.diff(fromGraph, toGraph, options);
57-
console.log(diff);
48+
```javascript
49+
var fbpDiff = require('fbp-diff');
50+
var options = {
51+
// fromFormat: 'object', // don't parse fromGraph, it is a JS object of a graph (default)
52+
// toFormat: 'json', // parse toGraph .json format
53+
format: 'fbp' // specify toFormat and fromFormat in one go
54+
};
55+
var fromGraph = "'hello' -> concat(Concatinator)\n'world' -> concat -> IN (Print)";
56+
var toGraph = "'hello' -> IN (Print)";
57+
var diff = fbpDiff.diff(fromGraph, toGraph, options);
58+
console.log(diff);
59+
```
5860

5961
## TODO
6062

0 commit comments

Comments
 (0)