Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to whitelist Markdown files for conversion (#278)
- Loading branch information
Showing
12 changed files
with
86 additions
and
15 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
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,15 @@ | ||
Foo | ||
|
||
Note: test note | ||
|
||
--- | ||
|
||
Bar | ||
|
||
---- | ||
|
||
Sub Bar | ||
|
||
--- | ||
|
||
The End. |
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 @@ | ||
Slides.md file |
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,26 @@ | ||
--- | ||
title: Foobar | ||
separator: <!--s--> | ||
verticalSeparator: <!--v--> | ||
theme: solarized | ||
revealOptions: | ||
transition: fade | ||
--- | ||
Foo | ||
|
||
Note: test note | ||
|
||
<!--s--> | ||
|
||
# Bar | ||
|
||
<!--v--> | ||
|
||
Sub Bar | ||
|
||
* Frag 1 <!-- .element: class="fragment" --> | ||
* Frag 2 <!-- .element: class="fragment" --> | ||
|
||
<!--s--> | ||
|
||
The End. |
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 @@ | ||
Slides.md file in subfolder |
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,19 @@ | ||
const test = require('bron'); | ||
const assert = require('assert').strict; | ||
const { join } = require('path'); | ||
const { listFiles } = require('../lib/util'); | ||
const { getFilesGlob } = require('../lib/config'); | ||
|
||
const FIXTURES_DIR = join(__dirname, 'fixtures'); | ||
|
||
test('listFiles should list all MD files with default config', async () => { | ||
const expected = ['a.md', 'slides.md', 'sub/c.md', 'sub/slides.md']; | ||
const actual = listFiles(FIXTURES_DIR, getFilesGlob()); | ||
assert.deepEqual(expected, actual); | ||
}); | ||
|
||
test('listFiles should list only files matching the glob', async () => { | ||
const expected = ['slides.md', 'sub/slides.md']; | ||
const actual = listFiles(FIXTURES_DIR, '**/slides.md'); | ||
assert.deepEqual(expected, actual); | ||
}); |