marp-team / marpit

The skinny framework for creating slide deck from Markdown
https://marpit.marp.app/
MIT License
948 stars 45 forks source link

marpit disables inlineSVG by default though other tools (e.g. marp-core and marp-cli) enables it by default #200

Closed exKAZUu closed 4 years ago

exKAZUu commented 5 years ago

I feel this inconsistency is a bit confusing (actually, I expected inlineSVG was disabled in other tools). inlineSVG seems one of key features in the tools, so I'd recommend to enable it in marpit, too. (But, I can understand the current design (a framework v.s. tools), so it's okay just to close this issue.)

yhatt commented 5 years ago

We cannot enable inlineSVG by default yet. There are 2 reasons.

Currently Marpit v2 (#194) and later also have no plan of this. The first step to clear up your confusion is raising our voice to WebKit. (https://bugs.webkit.org/show_bug.cgi?id=23113)

NOTE: Marp Core and followed Marp tools have no restrictions about executing browser JS. So we can use WebKit polyfill and useful helpers (e.g. auto-scaling code block and math). However, we still hope to require no scripts if possible.

exKAZUu commented 5 years ago

I see. Thank you for the explanation.

HTML files generated by marp-core and marp-cli (with bespoke or bare template) require the polyfill for WebKit browsers, right? (sorry in advance, if this is off-topic here). If so, I believe it's worth explaining that in the documents of these tools (e.g. https://github.com/marp-team/marp-core#marp-markdown, https://github.com/marp-team/marp-cli#convert-to-html and/or https://github.com/marp-team/marp-cli#template). If you agree, I'm happy to try contributing.

yhatt commented 5 years ago

It's not right. Marp Core has already included WebKit polyfill in Marp.ready(), and Marp CLI will detect and bundle this script automatically. So generated HTML in Marp CLI can render in WebKit browser correctly. User has not to take care anything.

exKAZUu commented 5 years ago

Oh, okay. I didn't understand the behavior. Thanks!