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

Remove dollar prefix alias for global directive #182

Closed
yhatt opened this issue Aug 2, 2019 · 0 comments · Fixed by #189
Closed

Remove dollar prefix alias for global directive #182

yhatt opened this issue Aug 2, 2019 · 0 comments · Fixed by #189

Comments

@yhatt
Copy link
Member

yhatt commented Aug 2, 2019

Recently I saw some media that introduces Marp ecosystem with the wrong how to use $ prefix.

Some media are explaining that <!-- $backgroundColor: #ff8800 --> can change background color in the whole of slides, but it's not true. $ prefix is just an alias into the unprefixed directive and only for global directives: theme, style, and headingDivider. In fact, $ prefix for local directives is invalid. $backgroundColor would never affect the view of slide.

The dollar prefix in Marpit's global directive is for keeping compatibility with the old Marp app and reducing some troubles while migration. (We recognize there are some people still cannot move to brand-new Marp from the old app like marp-team/marp-cli#85)

However, it brings Marp user misunderstanding for the new syntax as a fact. We had better discard the old syntax once in a while.

It may give bigger impact than we think, so we should allow to provide escape hatch by defining dollar-prefixed custom directives.

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 a pull request may close this issue.

1 participant