Skip to content

Commit

Permalink
Add test of converter about Marpit's new lang directive
Browse files Browse the repository at this point in the history
  • Loading branch information
yhatt committed Oct 28, 2023
1 parent 398fff6 commit 984fd15
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ describe('Converter', () => {
expect(result).toContain('<html lang="zh">')
})

it('prefers lang specified in Markdown than lang option', async () => {
const { result } = await instance().convert('<!-- lang: fr -->')
expect(result).toContain('<html lang="fr">')
})

it("overrides html option by converter's html option", async () => {
const defaultHtml = (await instance().convert('<i><br></i>')).rendered
expect(defaultHtml.html).toContain('&lt;i&gt;<br />&lt;/i&gt;')
Expand Down

0 comments on commit 984fd15

Please sign in to comment.