mobile fixes, fix bug when linking to anchor on home, docs
This commit is contained in:
		@@ -2,6 +2,7 @@ import { QuartzTransformerPlugin } from "../types"
 | 
			
		||||
import {
 | 
			
		||||
  CanonicalSlug,
 | 
			
		||||
  RelativeURL,
 | 
			
		||||
  _stripSlashes,
 | 
			
		||||
  canonicalizeServer,
 | 
			
		||||
  joinSegments,
 | 
			
		||||
  pathToRoot,
 | 
			
		||||
@@ -35,7 +36,7 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
 | 
			
		||||
          return (tree, file) => {
 | 
			
		||||
            const curSlug = canonicalizeServer(file.data.slug!)
 | 
			
		||||
            const transformLink = (target: string): RelativeURL => {
 | 
			
		||||
              const targetSlug = transformInternalLink(target).slice("./".length)
 | 
			
		||||
              const targetSlug = _stripSlashes(transformInternalLink(target).slice(".".length))
 | 
			
		||||
              let [targetCanonical, targetAnchor] = splitAnchor(targetSlug)
 | 
			
		||||
              if (opts.markdownLinkResolution === "relative") {
 | 
			
		||||
                return targetSlug as RelativeURL
 | 
			
		||||
 
 | 
			
		||||
@@ -225,7 +225,6 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
              // internal link
 | 
			
		||||
              // const url = transformInternalLink(fp + anchor)
 | 
			
		||||
              const url = fp + anchor
 | 
			
		||||
              return {
 | 
			
		||||
                type: "link",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user