summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-02-12 09:50:41 +0100
committerSamy Pessé <samypesse@gmail.com>2016-12-22 11:46:19 +0100
commitfb412152cb4a257a7236252ed7a7ca0d7a2cb96e (patch)
treed5180e4d78c38c835815c0f594a7c8c278e47d1e
parentbdefd1ed4ec3557e5699a7413cadd572badb9fd2 (diff)
downloadgitbook-fb412152cb4a257a7236252ed7a7ca0d7a2cb96e.zip
gitbook-fb412152cb4a257a7236252ed7a7ca0d7a2cb96e.tar.gz
gitbook-fb412152cb4a257a7236252ed7a7ca0d7a2cb96e.tar.bz2
Fix indentations
-rwxr-xr-xpackages/gitbook-asciidoc/lib/index.js10
-rwxr-xr-xpackages/gitbook-asciidoc/lib/langs.js14
-rwxr-xr-xpackages/gitbook-asciidoc/lib/page.js16
-rwxr-xr-xpackages/gitbook-asciidoc/lib/readme.js12
-rw-r--r--packages/gitbook-asciidoc/lib/utils/convert.js10
-rwxr-xr-xpackages/gitbook-asciidoc/test/page.js16
6 files changed, 39 insertions, 39 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;
diff --git a/packages/gitbook-asciidoc/test/page.js b/packages/gitbook-asciidoc/test/page.js
index f81f97d..9579725 100755
--- a/packages/gitbook-asciidoc/test/page.js
+++ b/packages/gitbook-asciidoc/test/page.js
@@ -5,18 +5,18 @@ var assert = require('assert');
var page = require('../').page;
function loadPage (name, options) {
- var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/' + name + '.adoc'), 'utf8');
- return page(CONTENT, options).sections;
+ var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/' + name + '.adoc'), 'utf8');
+ return page(CONTENT, options).sections;
}
var LEXED = loadPage('PAGE');
describe('Page parsing', function() {
- it('should detect sections', function() {
- assert.equal(LEXED.length, 1);
- });
+ it('should detect sections', function() {
+ assert.equal(LEXED.length, 1);
+ });
- it('should gen content for normal sections', function() {
- assert(LEXED[0].content);
- });
+ it('should gen content for normal sections', function() {
+ assert(LEXED[0].content);
+ });
});