File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 55 * @typedef {import('./state.js').State } State
66 */
77
8+ import structuredClone from '@ungap/structured-clone'
89import { normalizeUri } from 'micromark-util-sanitize-uri'
910
1011/**
@@ -110,8 +111,7 @@ export function footer(state) {
110111 type : 'element' ,
111112 tagName : state . footnoteLabelTagName ,
112113 properties : {
113- // To do: use structured clone.
114- ...JSON . parse ( JSON . stringify ( state . footnoteLabelProperties ) ) ,
114+ ...structuredClone ( state . footnoteLabelProperties ) ,
115115 id : 'footnote-label'
116116 } ,
117117 children : [ { type : 'text' , value : state . footnoteLabel } ]
Original file line number Diff line number Diff line change 3636 "dependencies" : {
3737 "@types/hast" : " ^3.0.0" ,
3838 "@types/mdast" : " ^4.0.0" ,
39+ "@ungap/structured-clone" : " ^1.0.0" ,
3940 "devlop" : " ^1.0.0" ,
4041 "mdast-util-definitions" : " ^6.0.0" ,
4142 "micromark-util-sanitize-uri" : " ^2.0.0" ,
4546 },
4647 "devDependencies" : {
4748 "@types/node" : " ^20.0.0" ,
49+ "@types/ungap__structured-clone" : " ^0.3.0" ,
4850 "c8" : " ^8.0.0" ,
4951 "hast-util-to-html" : " ^8.0.4" ,
5052 "hastscript" : " ^7.0.0" ,
You can’t perform that action at this time.
0 commit comments