diff options
Diffstat (limited to 'packages/gitbook-asciidoc/lib')
-rwxr-xr-x | packages/gitbook-asciidoc/lib/index.js | 10 | ||||
-rwxr-xr-x | packages/gitbook-asciidoc/lib/langs.js | 14 | ||||
-rwxr-xr-x | packages/gitbook-asciidoc/lib/page.js | 16 | ||||
-rwxr-xr-x | packages/gitbook-asciidoc/lib/readme.js | 12 | ||||
-rw-r--r-- | packages/gitbook-asciidoc/lib/utils/convert.js | 10 |
5 files changed, 31 insertions, 31 deletions
diff --git a/packages/gitbook-asciidoc/lib/index.js b/packages/gitbook-asciidoc/lib/index.js index ac8339a..a7c478c 100755 --- a/packages/gitbook-asciidoc/lib/index.js +++ b/packages/gitbook-asciidoc/lib/index.js @@ -1,8 +1,8 @@ module.exports = { - summary: require("./summary"), - glossary: require("./glossary"), - langs: require("./langs"), - readme: require("./readme"), - page: require("./page") + summary: require("./summary"), + glossary: require("./glossary"), + langs: require("./langs"), + readme: require("./readme"), + page: require("./page") }; diff --git a/packages/gitbook-asciidoc/lib/langs.js b/packages/gitbook-asciidoc/lib/langs.js index 3b6257e..d42f5dc 100755 --- a/packages/gitbook-asciidoc/lib/langs.js +++ b/packages/gitbook-asciidoc/lib/langs.js @@ -3,18 +3,18 @@ var parseEntries = require("./summary").entries; var parseLangs = function(content) { - return parseEntries(content); + return parseEntries(content); }; function langsToText(langs) { - var bl = "\n"; - var content = "= Languages"+bl+bl; + var bl = "\n"; + var content = "= Languages"+bl+bl; - _.each(langs, function(lang) { - content = content + ". link:"+lang.path+"["+lang.title+"]"+bl; - }); + _.each(langs, function(lang) { + content = content + ". link:"+lang.path+"["+lang.title+"]"+bl; + }); - return content; + return content; } module.exports = parseLangs; diff --git a/packages/gitbook-asciidoc/lib/page.js b/packages/gitbook-asciidoc/lib/page.js index ac9d7b0..2bcfe61 100755 --- a/packages/gitbook-asciidoc/lib/page.js +++ b/packages/gitbook-asciidoc/lib/page.js @@ -4,14 +4,14 @@ var _ = require('lodash'); var convert = require('./utils/convert'); function parsePage(src) { - return { - sections: [ - { - type: "normal", - content: convert(src) - } - ] - }; + return { + sections: [ + { + type: "normal", + content: convert(src) + } + ] + }; } module.exports = parsePage; diff --git a/packages/gitbook-asciidoc/lib/readme.js b/packages/gitbook-asciidoc/lib/readme.js index e8b73fa..bdcd3d3 100755 --- a/packages/gitbook-asciidoc/lib/readme.js +++ b/packages/gitbook-asciidoc/lib/readme.js @@ -4,13 +4,13 @@ var cheerio = require('cheerio'); var convert = require('./utils/convert'); function parseReadme(src) { - var html = convert(src); - var $ = cheerio.load(html); + var html = convert(src); + var $ = cheerio.load(html); - return { - title: $("h1:first-child").text().trim(), - description: $("div.paragraph").first().text().trim() - }; + return { + title: $("h1:first-child").text().trim(), + description: $("div.paragraph").first().text().trim() + }; } diff --git a/packages/gitbook-asciidoc/lib/utils/convert.js b/packages/gitbook-asciidoc/lib/utils/convert.js index 4fb45bd..8a19638 100644 --- a/packages/gitbook-asciidoc/lib/utils/convert.js +++ b/packages/gitbook-asciidoc/lib/utils/convert.js @@ -5,17 +5,17 @@ var processor = null; var useExtensions = true; if (useExtensions) { - processor = asciidoctor.Asciidoctor(true); + processor = asciidoctor.Asciidoctor(true); } else { - processor = asciidoctor.Asciidoctor(); + processor = asciidoctor.Asciidoctor(); } var convert = function(content) { - var options = opal.hash2(['attributes'], {'attributes': 'showtitle'}); + var options = opal.hash2(['attributes'], {'attributes': 'showtitle'}); - var html = processor.$convert(content, options); - return html; + var html = processor.$convert(content, options); + return html; }; module.exports = convert; |