Skip to content

Commit

Permalink
docs: proper syntax highlighting for acquit examples
Browse files Browse the repository at this point in the history
Fix #3975
  • Loading branch information
vkarpov15 committed Mar 19, 2016
1 parent 9723807 commit 77f4458
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/acquit.jade
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ block content
if block.comments && block.comments.length
| !{block.comments[block.comments.length - 1]}
:js
#{block.code}
!{block.code}
7 changes: 7 additions & 0 deletions docs/source/acquit.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var fs = require('fs');
var acquit = require('acquit');
var hl = require('highlight.js');
var marked = require('marked');

require('acquit-ignore')();
Expand Down Expand Up @@ -44,6 +45,9 @@ files.forEach(function(file) {
block.comments[last] =
marked(acquit.trimEachLine(block.comments[last]));
}
if (block.code) {
b.code = hl.highlight('javascript', b.code).value;
}

for (var j = 0; j < block.blocks.length; ++j) {
var b = block.blocks[j];
Expand All @@ -53,6 +57,9 @@ files.forEach(function(file) {
var last = b.comments.length - 1;
b.comments[last] = marked(acquit.trimEachLine(b.comments[last]));
}
if (b.code) {
b.code = hl.highlight('javascript', b.code).value;
}
}
}

Expand Down

0 comments on commit 77f4458

Please sign in to comment.