Skip to content

Commit

Permalink
fix: allow specifying id attribute for blockquotes (#247)
Browse files Browse the repository at this point in the history
Co-authored-by: Razon Yang <[email protected]>
  • Loading branch information
TetraTheta and razonyang authored Sep 10, 2024
1 parent 80d7236 commit 29fd6b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions layouts/_default/_markup/render-blockquote-regular.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
{{- if or (isset .Attributes "align") (isset .Attributes "caption") }}
<figure
class="{{ $borderClass }}{{ with .Attributes.align }} text-{{ . }}{{ end }}">
<blockquote class="{{ delimit $class ` ` }} mb-0">
<blockquote
{{ with .Attributes.id }}id="{{ . }}"{{ end }}
class="{{ delimit $class ` ` }} mb-0">
{{ .Text }}
</blockquote>
{{- with .Attributes.caption }}
Expand All @@ -29,7 +31,9 @@
{{- end }}
</figure>
{{- else }}
<blockquote class="{{ delimit $class ` ` }} {{ $borderClass }}">
<blockquote
{{ with .Attributes.id }}id="{{ . }}"{{ end }}
class="{{ delimit $class ` ` }} {{ $borderClass }}">
{{ .Text }}
</blockquote>
{{- end }}

0 comments on commit 29fd6b1

Please sign in to comment.