From d37bf0afc21f76e8f03ec3ac3a17059408118857 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Sat, 10 Jun 2023 04:10:42 +0900 Subject: [PATCH 1/3] Fix regression of not working emoji.twemoji.base option --- src/emoji/emoji.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/emoji/emoji.ts b/src/emoji/emoji.ts index bbe093da..e37192b5 100644 --- a/src/emoji/emoji.ts +++ b/src/emoji/emoji.ts @@ -31,6 +31,7 @@ export const markdown = marpitPlugin((md) => { // Casting to any is a workaround until merging the PR https://github.com/jdecked/twemoji/pull/1 (twemoji as any).parse(content, { attributes: () => ({ 'data-marp-twemoji': '' }), + base: twemojiOpts.base || undefined, ext: `.${twemojiExt}`, size: twemojiExt === 'svg' ? 'svg' : undefined, }) From 370c371a16499ffee1c435445e4b04d47348bcf0 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Sat, 10 Jun 2023 04:13:50 +0900 Subject: [PATCH 2/3] Update wrong test case --- test/marp.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/marp.ts b/test/marp.ts index a424280b..604959fa 100644 --- a/test/marp.ts +++ b/test/marp.ts @@ -177,9 +177,7 @@ describe('Marp', () => { it('uses specified base', () => expect( emojiSrc(':+1:', instance({ base: '/assets/twemoji/' })) - ).toMatchInlineSnapshot( - `"https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f44d.svg"` - )) + ).toMatchInlineSnapshot(`"/assets/twemoji/svg/1f44d.svg"`)) it("uses Twemoji's default CDN if the base option was undefined", () => expect( From ef6adc45055e2fd480b168530d5821da4da614ca Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Sat, 10 Jun 2023 04:17:59 +0900 Subject: [PATCH 3/3] [ci skip] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6250a4d9..bab255df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ ## [Unreleased] +### Changed + +- Upgrade Marpit to [v2.5.0](https://github.com/marp-team/marpit/releases/v2.5.0) ([#342](https://github.com/marp-team/marp-core/pull/342)) + - Added `paginate: skip` and `paginate: hold` + +### Fixed + +- Regression: Not working `emoji.twemoji.base` constructor option ([#343](https://github.com/marp-team/marp-core/issues/343), [#344](https://github.com/marp-team/marp-core/pull/344)) + ## v3.6.0 - 2023-04-01 ### Added