Skip to content

Commit 984fd15

Browse files
committed
Add test of converter about Marpit's new lang directive
1 parent 398fff6 commit 984fd15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/converter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ describe('Converter', () => {
132132
expect(result).toContain('<html lang="zh">')
133133
})
134134

135+
it('prefers lang specified in Markdown than lang option', async () => {
136+
const { result } = await instance().convert('<!-- lang: fr -->')
137+
expect(result).toContain('<html lang="fr">')
138+
})
139+
135140
it("overrides html option by converter's html option", async () => {
136141
const defaultHtml = (await instance().convert('<i><br></i>')).rendered
137142
expect(defaultHtml.html).toContain('&lt;i&gt;<br />&lt;/i&gt;')

0 commit comments

Comments
 (0)