forked from nbsp/marked-mfm
Turn export into an object
we have no options
This commit is contained in:
parent
003d398450
commit
76904e0888
2 changed files with 4 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
export default (options = {}) => ({
|
export default {
|
||||||
extensions: [
|
extensions: [
|
||||||
{
|
{
|
||||||
name: 'mfm',
|
name: 'mfm',
|
||||||
|
@ -37,4 +37,4 @@ export default (options = {}) => ({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
})
|
}
|
||||||
|
|
|
@ -2,17 +2,13 @@ import { marked } from 'marked'
|
||||||
import markedMfm from '../src/index.js'
|
import markedMfm from '../src/index.js'
|
||||||
|
|
||||||
describe('marked-mfm', () => {
|
describe('marked-mfm', () => {
|
||||||
beforeEach(() => {
|
|
||||||
marked.setOptions(marked.getDefaults())
|
|
||||||
})
|
|
||||||
|
|
||||||
test('inline', () => {
|
test('inline', () => {
|
||||||
marked.use(markedMfm())
|
marked.use(markedMfm)
|
||||||
expect(marked('$[x2 this text is bigger]')).toBe('<p><span style="display: inline-block" class="x2">this text is bigger</span></p>\n')
|
expect(marked('$[x2 this text is bigger]')).toBe('<p><span style="display: inline-block" class="x2">this text is bigger</span></p>\n')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('nested', () => {
|
test('nested', () => {
|
||||||
marked.use(markedMfm())
|
marked.use(markedMfm)
|
||||||
expect(marked('$[twitch twitch $[sparkle sparkle]]')).toBe('<p><span style="display: inline-block" class="twitch">twitch <span style="display: inline-block" class="sparkle">sparkle</span></span></p>\n')
|
expect(marked('$[twitch twitch $[sparkle sparkle]]')).toBe('<p><span style="display: inline-block" class="twitch">twitch <span style="display: inline-block" class="sparkle">sparkle</span></span></p>\n')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue