links to in-page anchors not working in Marked2's preview.
Hi and good day,
Although footnote links are working in Marked2, intext [links](#1) to an intext anchor are not working, why not?
My Marked editor is Mou, everything working fine there, why not Marked? Please answer this question.
/
[links](id:1 )with best regards,
Omar K N
Stockholm, Sweden
( The ” repository for Custom Styles on Github” is not helpful.)
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Brett on 17 Oct, 2016 04:06 PM
I'm not sure what the syntax you're showing is from, but it's not how in-document anchors would work. By default, only headlines get anchors, and in both GFM and MultiMarkdown you can force an anchor ID using syntax (though different between them). If you want to create a custom anchor, you need to use an HTML tag:
Could then be linked to with
the id:1 syntax is not a Markdown flavor that Marked recognizes.
-Brett
2 Posted by ss on 26 Jul, 2019 07:32 PM
// Please enter a detailed description of the issue // Description of the issue:
Clicking a content link with href="#anchor" targets incorrectly
// Please enter a list of steps required to reproduce the issue // Steps to reproduce:
// If applicable please attach a sample document that causes the issue for you.
// Configuration (do not edit) Marked 2 974 (Direct)
macOS Version: 10.13.6
additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 100
defaultProcessor: Discount (GFM)
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: NO
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: NO
includeKatex: NO
limitTextWidth: YES
minimalJavaScript: YES
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: YES
shouldLoadCritic: NO
syntaxHighlight: NO
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES
Support Staff 3 Posted by Brett on 26 Jul, 2019 09:40 PM
Try using id=anchor instead of name=anchor (that's been deprecated for
some time). Let me know if that helps, there may still be issues
surrounding what Marked does to handle its own table of contents links
that sometimes overrides manual anchors.
Thanks,
Brett
4 Posted by ss on 26 Jul, 2019 09:45 PM
Seems slightly better, but the "in-content" link still fails to navigate to the target properly. It seems to go to the top and then move downward a certain amount that I can't determine any pattern for. It no longer navigates back to the link in the toc however... so that's something ;)
Support Staff 5 Posted by Brett on 26 Jul, 2019 09:48 PM
Ok, I'm on the road for the weekend so I won't be able to look into this further until next week. Thanks for your patience.
- Brett