Skip to content

Commit

Permalink
chore: 清理处理footnote的代码注释
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiuChen committed Jun 24, 2023
1 parent e6b078c commit afbd183
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/common/plugins/enhancePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,32 +72,6 @@ export function enhancePlugin(): BytemdPlugin {
// 阻止默认行为
ev.preventDefault()
ev.stopPropagation()

// TODO: content -> footnote的跳转

// const content = markdownBody.querySelector(
// `a#user-content-${footnoteId}`
// ) as HTMLLinkElement | null

// console.log(`a#user-content-${footnoteId}`, content)

// if (content) {
// // 在容器内滚动 使得footnote在容器内可见
// // 两种可能:split preview | 只读的viewer
// const container1 = document.querySelector('.bytemd-preview') as HTMLElement | null
// const container2 = document.querySelector('.viewer-container') as HTMLElement | null

// console.log('container1', container1)
// console.log('container2', container2)

// if (container1) {
// container1.scrollTop = content.offsetTop - container1.offsetTop
// }

// if (container2) {
// container2.scrollTop = content.offsetTop - container2.offsetTop
// }
// }
}
}
})
Expand Down

0 comments on commit afbd183

Please sign in to comment.