summaryrefslogtreecommitdiffstats
path: root/test/plugins/blocks/index.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-26 09:41:26 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-26 09:41:26 +0100
commitd3d64f636c859f7f01a64f7774cf70bd8ccdc562 (patch)
tree4f7731f37c3a793d187b0ab1cd77680e69534c6c /test/plugins/blocks/index.js
parent4cb9cbb5ae3aa8f9211ffa3ac5e3d34232c0ca4f (diff)
parenteef072693b17526347c37b66078a5059c71caa31 (diff)
downloadgitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.zip
gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.gz
gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.bz2
Merge pull request #1109 from GitbookIO/3.0.0
Version 3.0.0
Diffstat (limited to 'test/plugins/blocks/index.js')
-rw-r--r--test/plugins/blocks/index.js61
1 files changed, 0 insertions, 61 deletions
diff --git a/test/plugins/blocks/index.js b/test/plugins/blocks/index.js
deleted file mode 100644
index 9bdbe86..0000000
--- a/test/plugins/blocks/index.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var assert = require("assert");
-
-module.exports = {
- blocks: {
- "test": {
- shortcuts: {
- parsers: ["markdown"],
- start: "$$",
- end: "$$"
- },
- process: function(blk) {
- return "test"+blk.body+"test";
- }
- },
- "test2": {
- end: "endtest2end",
- process: function(blk) {
- return "test2"+blk.body+"test2";
- }
- },
- "test3join": {
- blocks: [
- "also"
- ],
- process: function(blk) {
- return [blk.body, blk.blocks[0].body].join(blk.kwargs.separator);
- }
- },
- "test4join": {
- blocks: [
- "also", "finally"
- ],
- process: function(blk) {
- assert(blk.blocks.length, 2);
- assert(blk.blocks[0].name, "also");
- assert(blk.blocks[1].name, "finally");
- return [blk.body, blk.blocks[0].body, blk.blocks[1].body].join(blk.kwargs.separator);
- }
- },
- "test5args": {
- process: function(blk) {
- return "test5"+blk.args.join(",")+"test5";
- }
- },
- "test5kwargs": {
- process: function(blk) {
- var s = blk.args.join(",");
- for (var key in blk.kwargs) {
- s = s + ","+key+":"+blk.kwargs[key];
- }
-
- return "test5"+s+"test5";
- }
- },
- "test6context": {
- process: function() {
- return "test6"+(this.ctx.name)+"test6";
- }
- },
- }
-}; \ No newline at end of file