From 196cdde4877ff502b4352348236aff3e7d77e946 Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Wed, 7 Aug 2024 08:39:56 +0100 Subject: [PATCH] Change asciinema container style From videoblock to asciinemablock to have different styling config apart from other video players. Fixes #38 --- lib/asciinema-extension.js | 2 +- test/asciinema-extension-test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/asciinema-extension.js b/lib/asciinema-extension.js index 23d12c0..6b33259 100644 --- a/lib/asciinema-extension.js +++ b/lib/asciinema-extension.js @@ -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)) diff --git a/test/asciinema-extension-test.js b/test/asciinema-extension-test.js index 2ecf2ca..1462bba 100644 --- a/test/asciinema-extension-test.js +++ b/test/asciinema-extension-test.js @@ -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 () => { @@ -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') }) }) })