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

Disable Marpit polyfill when using VS Code >= 1.36 (Electron 4) #49

Merged
merged 3 commits into from
Jun 13, 2019

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Jun 12, 2019

I've found just disabled @marp-team/marpit-svg-polyfill can fix the strange hit area reported at #45. This PR will detect the version of VS Code and toggle whether to apply polyfill.

Resolves #45.

ℹ️ We have already known edge cases to bring glitch to rendering CSS 3D transform and <video> element in Electron 4 without polyfill, so I added the comment about rendering in Electron 3-6.

// also has a glitch in video, and we have to wait for stable rendering until
// Electron 6.
const coercedVer = coerce(version)
const isRequiredPolyfill = coercedVer ? lt(coercedVer, '1.36.0') : false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VS Code seems not to provide API for getting Electron version. Instead we are using known VS Code version.

@yhatt yhatt merged commit 27dda1f into master Jun 13, 2019
@yhatt yhatt deleted the electron4 branch June 13, 2019 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link has wrong hit area in VS Code 1.36-insider
1 participant