You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll write this idea just quickly. This variable would give the heading text based on the caret's current position.
If the caret is on a heading line, give that line.
If the caret is not on a heading line, look for the nearest heading above the caret.
If there is no headings in the file, the variable should be unavailable. I.e. a user could define a default value for this situation. A good example for a default value could be to read another variable: {{title}}.
If the caret is above all headings, i.e. there's no heading above the caret, the variable should be unavailable, too.
There would be two modes for this variable:
{{caret_heading:with-hashes}} Would include all hash characters # in the result (and spaces in-between): ### My third level heading
{{caret_heading:no-hashes}} Would include no hash characters # in the result (and no preceding spaces): My third level heading
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'll write this idea just quickly. This variable would give the heading text based on the caret's current position.
{{title}}
.There would be two modes for this variable:
{{caret_heading:with-hashes}}
Would include all hash characters#
in the result (and spaces in-between):### My third level heading
{{caret_heading:no-hashes}}
Would include no hash characters#
in the result (and no preceding spaces):My third level heading
Examples:
Gives: Mode: Cooldown first, then execute
Gives: Different debouncing modes
Beta Was this translation helpful? Give feedback.
All reactions