Skip to content

tag() improvement & heading functions#18524

Merged
brandonkelly merged 3 commits into5.10from
feature/tag-functions
Mar 7, 2026
Merged

tag() improvement & heading functions#18524
brandonkelly merged 3 commits into5.10from
feature/tag-functions

Conversation

@brandonkelly
Copy link
Member

@brandonkelly brandonkelly commented Mar 7, 2026

Description

Improves the tag() function, making it possible to pass a string into its second argument, as a shortcut for the text attribute:

{{ tag('p', 'Hello') }}

And adds new heading functions:

{{ heading(2, 'Hello') }}
{{ h(2, 'Hello') }}

{{ h1('Hello') }}
{{ h2('Hello') }}
{{ h3('Hello') }}
{{ h4('Hello') }}
{{ h5('Hello') }}
{{ h6('Hello') }}

Like tag() now, either a string or attribute hash can be passed to the heading functions.

{{ heading(2, {
  text: 'Hello',
  class: 'component-title',
}) }}

Related issues

@brandonkelly brandonkelly changed the title Feature/tag functions tag() improvement & heading functions Mar 7, 2026
[ci skip]
@brandonkelly brandonkelly merged commit 32fc657 into 5.10 Mar 7, 2026
@brandonkelly brandonkelly deleted the feature/tag-functions branch March 7, 2026 17:19
@brandonkelly
Copy link
Member Author

brandonkelly commented Mar 9, 2026

(We decided to drop the baseHeadingLevel concept for now – 188863002307b79a1f353609dbe32701a6e2dbef)

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.

1 participant