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

Reflect lang global directive to HTML templates #558

Merged
merged 5 commits into from
Oct 28, 2023
Merged

Reflect lang global directive to HTML templates #558

merged 5 commits into from
Oct 28, 2023

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Oct 28, 2023

lang directive has added since Marpit framework v2.6.0. (marp-team/marpit#376)

By this change, lang attribute in <html> element of templates will determine with the priority in order of below:

  • If lang global directive was defined in Markdown, it would be set as lang attribute of <html>.
  • If not, lang prefers the engine constructor option passed by options in configuration file.
  • If options.lang is not defined, lang field of configuration file will be used. (Already implemented)
  • If not defined lang field, Marp CLI will fallback to OS locale. This is the most general case for now. (Already implemented)

Closes #542.

@yhatt yhatt changed the title Reflect lang directive in HTML templates Reflect lang global directive to HTML templates Oct 28, 2023
@yhatt yhatt merged commit 34a57fb into main Oct 28, 2023
1 check passed
@yhatt yhatt deleted the lang-directive branch October 28, 2023 13:19
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.

Add support for lang directive
1 participant