Merged
Conversation
1. Allow configuring link placement:
* `reference` (default): show URLs reference-style at the bottom of each
slide.
* `drop`: Do not show the URLs at all (this only makes sense if
[OSC8](#OSC8) is turned on).
For example:
```yaml
patat:
links:
osc8: true
placement: drop
```
2. In addition to rendering OSC8 URLs on the inline links, do the same for
the ones in the reference section.
3. Underline all OSC8 links.
dosmanak
reviewed
Feb 16, 2026
| , themeCode :: !(Maybe Style) | ||
| , themeLinkText :: !(Maybe Style) | ||
| , themeLinkTarget :: !(Maybe Style) | ||
| , themeLinkOSC8 :: !(Maybe Style) -- Undocumented |
There was a problem hiding this comment.
Does it make sense to use diffrent style than themeLinkTarget?
Owner
Author
There was a problem hiding this comment.
Think of this as just extra formatting that gets applied if text gets linked using OSC8, I'm using it to always underline in that case.
| | otherwise = PP.text url | ||
| hyperlink ds url (Just doc) | ||
| | dsOSC8 ds = PP.hyperlink (T.unpack url) doc | ||
| | dsOSC8 ds = themed ds themeLinkOSC8 $ PP.hyperlink (T.unpack url) doc |
There was a problem hiding this comment.
why not use already existing themeLinkTarget? I see the text would need both styles themeLink and themeLinkTarget merged, but that might be complicated.
| instance A.FromJSON LinkPlacement where | ||
| parseJSON = A.withText "FromJSON LinkPlacement" $ \t -> case t of | ||
| "reference" -> pure ReferenceLinkPlacement | ||
| "drop" -> pure DropLinkPlacement |
There was a problem hiding this comment.
Perhaps fail if lsOSC == false && lsPlacement == "drop"?
Owner
Author
There was a problem hiding this comment.
That's a good idea, I'll add a validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow configuring link placement:
reference(default): show URLs reference-style at the bottom of eachslide.
drop: Do not show the URLs at all (this only makes sense if OSC8 isturned on).
For example:
In addition to rendering OSC8 URLs on the inline links, do the same for the ones in the reference section.
Underline all OSC8 links.