fix(assets): pdf page linking support. (#1025)
* github-slugger pdf workaround * Skip sluggifying on pdf file extension * Account for pdf files without anchor * Address feedback
This commit is contained in:
		@@ -168,6 +168,9 @@ export function resolveRelative(current: FullSlug, target: FullSlug | SimpleSlug
 | 
			
		||||
 | 
			
		||||
export function splitAnchor(link: string): [string, string] {
 | 
			
		||||
  let [fp, anchor] = link.split("#", 2)
 | 
			
		||||
  if (fp.endsWith(".pdf")) {
 | 
			
		||||
    return [fp, anchor === undefined ? "" : `#${anchor}`]
 | 
			
		||||
  }
 | 
			
		||||
  anchor = anchor === undefined ? "" : "#" + slugAnchor(anchor)
 | 
			
		||||
  return [fp, anchor]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user