-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d6919c
commit a1fac1a
Showing
13 changed files
with
85 additions
and
83 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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { fixtureTestProcessor } from '../../test-utils/fixture-test-processor'; | ||
import { ignoreWhitespace } from '../../test-utils/test-processor'; | ||
|
||
describe('multifile knitr state', () => { | ||
it('should allow knitr state to pass between files', async () => { | ||
const { md } = await fixtureTestProcessor('multifile-knitr-state'); | ||
console.log(md); | ||
expect(ignoreWhitespace(md)).toContain('```{.r-output}[1]3```'); | ||
const { html } = await fixtureTestProcessor('multifile-knitr-state'); | ||
expect(html).toContain('<code>[1] 3</code>'); | ||
expect(html).toContain('test/1/university-of-glasgow.png'); | ||
expect(html).toContain('test/2/Media_811846_smxx.jpeg'); | ||
}); | ||
}); |
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,14 @@ | ||
import { Paragraph } from 'mdast'; | ||
import { Node } from 'unist'; | ||
import { visit } from 'unist-util-visit'; | ||
|
||
export function removeEmptyParagraphs() { | ||
return async (tree: Node) => { | ||
visit(tree, 'paragraph', (node: Paragraph, index, parent) => { | ||
if (node.children.length === 0) { | ||
const parentChildren = parent?.children || []; | ||
parentChildren.splice(index || 0, 1); | ||
} | ||
}); | ||
}; | ||
} |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: 'Test' | ||
title: 'Multifile counter' | ||
content: | ||
# - type: text | ||
# src: one/1.Rmd | ||
# - type: text | ||
# src: two/2.Rmd | ||
- type: text | ||
src: three/3.Rmd | ||
src: 1/1.Rmd | ||
- type: text | ||
src: 2/2.Rmd | ||
# - type: text | ||
# src: three/3.Rmd |