use of 'meta' fields
My code — the first two lines are 'meta' fields, invisible on the preview document (using Marked 2)
Title: Document title Domain: https://relevant-domain.com [Document title]([%domain])
The aim is that the title will include an embedded link to the domain, using the meta field. But it produces a null response.
By contrast, If I insert the domain as text:
It works. Anyone know why / solution / workaround.
For the record: using '[domain]' alone returns a working link. It's only when I use it as an embedded link, behind text that it doesn't work. Marked 2 reports: Unknown [%domain]
This is a proof case question; not a single use issue: I will re-use this syntax device elsewhere if I can get it working. So just telling me to use the text version isn't a help. Thanks!
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
Support Staff 1 Posted by Fletcher on 09 Dec, 2022 12:35 PM
There are a couple of things going on here.
MultiMarkdown parses in a single pass, so you can't "nest" things that
have to be resolved sequentially.
Metadata variables (the '[%foo]' construct) have to be a "top-level"
element within a span of plain text in order to be converted into the
value from the metadata.
Additionally, the URL construction (`[foo](URL)`) does not interpret
Markdown inside the `(URL)` section -- that text is used as is.
In this case, you are saying that the URL is literally `[%domain]`.
You can test something similar with `[Foo **bar**](Foo **bar**)`. The
strong attribute is applied to the link text, but not the URL.
The one exception to the "single pass" rule is that there is a
pre-processing step that handles the `mmd header` and `mmd footer`
metadata, and performs file transclusion to create the final plain text
source, and *then* the MultiMarkdown parser does it's thing.
2 Posted by John Clements on 09 Dec, 2022 01:48 PM
No dice then. Thanks for explaining principles.