diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-09-01 12:00:13 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-09-01 18:12:26 +0200 |
commit | e651d29801325095cb6a684fb7ce31934ce2906c (patch) | |
tree | 4d6606f8b5c0b25fbd93030cd75f3665661dbed4 /markup/converter | |
parent | 0c453420e6fceccf36d06cea0a9e53ac6b8401ba (diff) | |
download | hugo-e651d29801325095cb6a684fb7ce31934ce2906c.tar.gz hugo-e651d29801325095cb6a684fb7ce31934ce2906c.zip |
Add support for Obsidian type blockquote alerts
* Make the alert type parsing more flexible to support more types
* Add `AlertTitle` and `AlertSign` (for folding)
Note that GitHub will not render callouts with alert title/sign.
See https://help.obsidian.md/Editing+and+formatting/Callouts
Closes #12805
Closes #12801
Diffstat (limited to 'markup/converter')
-rw-r--r-- | markup/converter/hooks/hooks.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/markup/converter/hooks/hooks.go b/markup/converter/hooks/hooks.go index 96c165321..1fc513acb 100644 --- a/markup/converter/hooks/hooks.go +++ b/markup/converter/hooks/hooks.go @@ -109,6 +109,16 @@ type BlockquoteContext interface { // The GitHub alert type converted to lowercase, e.g. "note". // Only set if Type is "alert". AlertType() string + + // The alert title. + // Currently only relevant for Obsidian alerts. + // GitHub does not suport alert titles and will not render alerts with titles. + AlertTitle() hstring.HTML + + // The alert sign, "+" or "-" or "" used to indicate folding. + // Currently only relevant for Obsidian alerts. + // GitHub does not suport alert signs and will not render alerts with signs. + AlertSign() string } type PositionerSourceTargetProvider interface { |