Skip to content

Commit 5a7ebe4

Browse files
Merge pull request #808 from aspeddro/add-anchor
add anchor id as parameter on heading element
2 parents 7950d2e + 1d945f3 commit 5a7ebe4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/Markdown.res

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ module H2 = {
136136
@react.component
137137
let make = (~id, ~children) => <>
138138
// Here we know that children is always a string (## headline)
139-
<h2 className="group mt-16 mb-3 hl-3">
139+
<h2 id className="group mt-16 mb-3 hl-3">
140140
children
141141
<span className="ml-2">
142142
<Anchor id />
@@ -148,7 +148,7 @@ module H2 = {
148148
module H3 = {
149149
@react.component
150150
let make = (~id, ~children) =>
151-
<h3 className="group mt-8 mb-4 hl-4">
151+
<h3 id className="group mt-8 mb-4 hl-4">
152152
children
153153
<span className="ml-2">
154154
<Anchor id />
@@ -159,7 +159,7 @@ module H3 = {
159159
module H4 = {
160160
@react.component
161161
let make = (~id, ~children) =>
162-
<h4 className="group mt-8 hl-5">
162+
<h4 id className="group mt-8 hl-5">
163163
children
164164
<span className="ml-2">
165165
<Anchor id />
@@ -171,6 +171,7 @@ module H5 = {
171171
@react.component
172172
let make = (~id, ~children) =>
173173
<h5
174+
id
174175
className="group mt-12 mb-3 text-12 leading-2 font-sans font-semibold uppercase tracking-wide text-gray-80">
175176
children
176177
<span className="ml-2">

0 commit comments

Comments
 (0)