File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed
Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,13 @@ module H2 = {
160160module H3 = {
161161 @react.component
162162 let make = (~id , ~children ) => {
163- let title = childrenToString (children )
163+ let title = {
164+ try {
165+ childrenToString (children )-> Url .normalizeAnchor
166+ } catch {
167+ | _ => ""
168+ }
169+ }
164170 <h3 id className = "group mt-8 mb-4 hl-4 scroll-mt-32" >
165171 children
166172 <span className = "ml-2" >
@@ -173,7 +179,13 @@ module H3 = {
173179module H4 = {
174180 @react.component
175181 let make = (~id , ~children ) => {
176- let title = childrenToString (children )
182+ let title = {
183+ try {
184+ childrenToString (children )-> Url .normalizeAnchor
185+ } catch {
186+ | _ => ""
187+ }
188+ }
177189 <h4 id className = "group mt-8 hl-5 scroll-mt-32" >
178190 children
179191 <span className = "ml-2" >
@@ -186,7 +198,13 @@ module H4 = {
186198module H5 = {
187199 @react.component
188200 let make = (~id , ~children ) => {
189- let title = childrenToString (children )
201+ let title = {
202+ try {
203+ childrenToString (children )-> Url .normalizeAnchor
204+ } catch {
205+ | _ => ""
206+ }
207+ }
190208 <h5
191209 id
192210 className = "group mt-12 mb-3 text-12 leading-2 font-sans font-semibold uppercase tracking-wide text-gray-80"
You can’t perform that action at this time.
0 commit comments