This repository has been archived by the owner on Apr 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⬆️ Upgrade to Asciidoctor 1.5.6.1 (#11)
- Loading branch information
1 parent
b42be03
commit 3638145
Showing
7 changed files
with
126 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// UMD Module | ||
(function (root, factory) { | ||
if (typeof module === 'object' && module.exports) { | ||
// Node. Does not work with strict CommonJS, but | ||
// only CommonJS-like environments that support module.exports, | ||
// like Node. | ||
module.exports = factory; | ||
} else if (typeof define === 'function' && define.amd) { | ||
// AMD. Register a named module. | ||
define('asciidoctor/template', ['asciidoctor'], function () { | ||
return factory(); | ||
}); | ||
} else { | ||
// Browser globals (root is window) | ||
if (typeof root.Asciidoctor === 'undefined') { | ||
throw new Error('Asciidoctor.js should be loaded before Asciidoctor Template.js'); | ||
} | ||
root.Asciidoctor.Template = factory; | ||
} | ||
}(this, function () { | ||
//#{asciidoctorTemplateCode} | ||
|
||
return {}; | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
= Title | ||
|
||
== Slide 1 | ||
Content 1 | ||
|
||
== Slide 2 | ||
Content 2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
<section> | ||
<section id="_slide_1" data-transition="" data-transition-speed="" data-background="" data-background-size="" data-background-repeat="" data-background-transition=""> | ||
<h2>Slide 1</h2> | ||
<div id="" class="paragraph $$id apply call"> | ||
<p>Content 1</p> | ||
</div> | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section id="_slide_2" data-transition="" data-transition-speed="" data-background="" data-background-size="" data-background-repeat="" data-background-transition=""> | ||
<h2>Slide 2</h2> | ||
<div id="" class="paragraph $$id apply call"> | ||
<p>Content 2</p> | ||
</div> | ||
</section> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const asciidoctor = require('asciidoctor.js')(); | ||
require('../build/asciidoctor-template.js')(); // Asciidoctor Template | ||
const assert = require('assert'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
describe('Rendering', function () { | ||
|
||
const readFixtureSync = function (fileName) { | ||
return fs.readFileSync(path.join('test', 'fixtures', fileName), 'utf-8'); | ||
}; | ||
|
||
it('should produce a simple Reveal.js presententation when backend=revealjs', function () { | ||
const options = {safe: 'safe', backend: 'revealjs'}; | ||
const file = 'simple_presentation'; | ||
const content = readFixtureSync('simple_presentation.adoc'); | ||
const html = asciidoctor.convert(content, options); | ||
assert.equal(html, readFixtureSync('simple_presentation.html')); | ||
}); | ||
}); |