Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Marp constructor option, emoji.twemoji.base, seems not working #343

Closed
tais9 opened this issue Jun 9, 2023 · 1 comment · Fixed by #344
Closed

A Marp constructor option, emoji.twemoji.base, seems not working #343

tais9 opened this issue Jun 9, 2023 · 1 comment · Fixed by #344
Labels
bug Something isn't working

Comments

@tais9
Copy link

tais9 commented Jun 9, 2023

Version of Marp Tool

Marp cli 2.5.0

Operating System

Windows

Environment

  • OS version: Windows 11 and macOS Big Sur 11.4
  • Node.js version Marp CLI 2.5.0
  • VS Code version (Marp for VS Code): N/A

How to reproduce

It seems like twemoji.base is not working. Other options like shortcode and unicode work well.
For instance, consider the following config file,

options:
emoji:
shortcode: ‘twemoji’
unicode: false
twemoji:
base: ‘/twemoji/assets/‘

The generated html file still has jsDeliver link instead of the specified base option.

Expected behavior

The generated slide deck should have twemojis with the specified base.

Actual behavior

Marp’s recently changed default base (jsDeliver) is used.

Additional information

No response

@tais9 tais9 added the bug Something isn't working label Jun 9, 2023
@yhatt yhatt transferred this issue from marp-team/.github Jun 9, 2023
@tais9 tais9 changed the title Marp constructor option, emoji.twemoji.base not working Marp constructor option, emoji.twemoji.base, seems not working Jun 9, 2023
@tais9 tais9 changed the title Marp constructor option, emoji.twemoji.base, seems not working A Marp constructor option, emoji.twemoji.base, seems not working Jun 9, 2023
@yhatt
Copy link
Member

yhatt commented Jun 9, 2023

Good catch. A following test is obviously wrong 😭

marp-core/test/marp.ts

Lines 176 to 182 in da3cfbd

describe('base option', () => {
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"`
))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants