mirror of
				https://github.com/ZetaKebab/quartz.git
				synced 2025-11-03 22:49:47 +00:00 
			
		
		
		
	fix: don't show popovers on heading anchors
This commit is contained in:
		@@ -7,6 +7,10 @@ async function mouseEnterHandler(
 | 
			
		||||
  { clientX, clientY }: { clientX: number; clientY: number },
 | 
			
		||||
) {
 | 
			
		||||
  const link = this
 | 
			
		||||
  if (link.dataset.noPopover === "true") {
 | 
			
		||||
    return
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async function setPosition(popoverElement: HTMLElement) {
 | 
			
		||||
    const { x, y } = await computePosition(link, popoverElement, {
 | 
			
		||||
      middleware: [inline({ x: clientX, y: clientY }), shift(), flip()],
 | 
			
		||||
 
 | 
			
		||||
@@ -31,6 +31,11 @@ export const GitHubFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options> |
 | 
			
		||||
            rehypeAutolinkHeadings,
 | 
			
		||||
            {
 | 
			
		||||
              behavior: "append",
 | 
			
		||||
              properties: {
 | 
			
		||||
                ariaHidden: true,
 | 
			
		||||
                tabIndex: -1,
 | 
			
		||||
                "data-no-popover": true,
 | 
			
		||||
              },
 | 
			
		||||
              content: {
 | 
			
		||||
                type: "text",
 | 
			
		||||
                value: " §",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user