Several markdown engines or extensions allow one to add properties to Headings, for example:
# My heading # {#foo .unnumbered}
One way to do this is with the Title Suffixes options in the Compiler. I can add some custom metadata to a document:
Then in the Title Suffix I add this to the suffix:
This now generates well-formed Markdown (using the option to place suffix after hashes):
# Mercury # {#mercury .left}
So far so good, however let’s say i have a Scrivener [Document link] to this document/heading. I disable the compiler options to modify document links just in case:
But the compiled markdown with the document link shows this:
# Mars # { }
Now what are the possibilities of warp drive ([see Mercury][Mercury # {#mercury .left}])? Cmdr Riker's nervous system has been invaded by an unknown microorganism. The organisms fuse to the nerve, intertwining at the molecular level.
The link text is fine, but the [link target] has # {#mercury .left}
suffix data appended to the target text (this will break the link; the link should be [see Mercury][Mercury]
).
@AmberV — I’ve read through §24.8 of the user manual, but it isn’t clear what should happen in the case of markdown link resolution. To make a working link there should be no suffix data in the [link target]. I’ve tried this option set too just in case but the result is the same:
Sample project here:
SuffixIssue.scriv.zip (75.2 KB)
p.s. I realise injecting an ID may cause other problems if header text and ID conflict, but that is a separate problem concerning markdown itself.