Behaviour SwRS-MDOKFSTUDIO-CORE-079
Inline code shows a front matter value of the document
When inline code in the body is exactly = this.field or =this.field and the front matter of the document holds a value for that field, the preview SHALL show that value as plain text in place of the inline code, and SHALL show the inline code as written with a warning style and report a warning when the field is missing.
Part of StRS-MDOKFSTUDIO-CORE-001, outside the paths drawn on its map.
Scenarios 5
The situations the tests check; open one to read it.
nominalA field of the front matter in the text
nominalThe value follows the front matter
boundaryTypes of value
| Value of the field | Shown as |
|---|---|
| a string or a number | the text |
| a boolean | true or false |
| a list | its items joined with a comma and a space |
| an object | its YAML on one line, in flow style |
| a nested field, written this.a.b | the value at that path, through objects only |
The form is inline code that holds exactly = this.field or =this.field, with at most one space after the equals sign. The number of backticks that delimit the inline code does not change its text: to show the form itself as code, keep a backtick inside the code (`` `= this.field` ``, shown with its backticks) or put it in a fenced block. The value is set as text: HTML and Markdown in it are never interpreted. A table of contents entry built from a heading that holds the form reads the value, and the heading anchor and the link of the entry are built from the value too (they agree, and they change when the value changes). An included file is part of the rendered document: its form reads the front matter of the including document. An empty object counts as without a value, like an empty list.