feat(shortcode): added markdown attribute support for headers (#851)

docs: added "no-step-marker" example for steps
This commit is contained in:
Paul Marrapese
2025-10-11 15:13:04 -07:00
committed by GitHub
parent 708358de80
commit b7f4bffce6
3 changed files with 12 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ title: Steps
A built-in component to display a series of steps.
You can use the Markdown attribute `{class="no-step-marker"}` to prevent a heading from being counted as a step.
## Example
{{% steps %}}
@@ -16,6 +18,10 @@ This is the first step.
This is the second step.
#### Step subheading {class="no-step-marker"}
This will not be counted as a step.
### Step 3
This is the third step.
@@ -43,5 +49,9 @@ This is the first step.
This is the second step.
#### Step subheading {class="no-step-marker"}
This will not be counted as a step.
{{%/* /steps */%}}
```

View File

@@ -715,6 +715,7 @@
"msupsub",
"mtable",
"mtight",
"no-step-marker",
"not-prose",
"nulldelimiter",
"op-symbol",

View File

@@ -1,4 +1,4 @@
<h{{ .Level }}>
<h{{ .Level }} {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
{{- .Text | safeHTML -}}
{{- if gt .Level 1 -}}
<span class="hx:absolute hx:-mt-20" id="{{ .Anchor | safeURL }}"></span>