Skip to content

Commit

Permalink
Change asciinema container style
Browse files Browse the repository at this point in the history
From videoblock to asciinemablock to have different
styling config apart from other video players.

Fixes #38
  • Loading branch information
jvalkeal authored and rwinch committed Aug 7, 2024
1 parent f531822 commit 196cdde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/asciinema-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const toBlock = (attrs, parent, source, context, uiCatalog, defaultOptions, file
source = doc.$apply_subs(attrs.subs, doc.$resolve_subs(subs))
}
const idAttr = attrs.id ? ` id="${attrs.id}"` : ''
const classAttr = attrs.role ? `${attrs.role} videoblock` : 'videoblock'
const classAttr = attrs.role ? `${attrs.role} asciinemablock` : 'asciinemablock'

const block = context.$create_pass_block(parent, '', Opal.hash(attrs))

Expand Down
4 changes: 2 additions & 2 deletions test/asciinema-extension-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('asciinema-extension', () => {

expect(siteAsciiDocConfig.extensions.length).to.equal(1)
expect(uiCatalog.files.length).to.equal(1)
expect(out).to.contains('video')
expect(out).to.contains('asciinema')
})

it('should work with duplicate blocks', async () => {
Expand All @@ -165,7 +165,7 @@ describe('asciinema-extension', () => {

expect(siteAsciiDocConfig.extensions.length).to.equal(1)
expect(uiCatalog.files.length).to.equal(1)
expect(out).to.contains('video')
expect(out).to.contains('asciinema')
})
})
})

0 comments on commit 196cdde

Please sign in to comment.