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
## Details
Request: #404
While the request seems to be about using the parent color across the
board, I've instead implemented this in a slightly more complex but
hopefully more pretty way.
Rather than highlighting entire sets of `block quote` markers, i.e.
`> > >`, with a single highlight we now associate colors based on the
level of the block quote.
What this means is if we're into a triple nested block quote where:
- Level 1: `[!IMPORTANT]` callout
- Level 2: no callout
- Level 3: `[!BUG]` callout
We'll use highlight as follows:
- `>` 1: `[!IMPORTANT]` callout highlight
- `>` 2: default `quote` highlight
- `>` 3: `[!BUG]` callout highlight
This applies throughout the `block quote` on all lines. To handle the
`lazy` provision of the `markdown` spec we simply go front to back one
level at a time. So if on some line `> >` is added even though the level
is still technically 3, we only highlight the first 2 according to the
first 2 levels.
So as not to limit the usage to callouts `quote.icon` and `quote.highlight`
now both support taking a list of strings in addition to a single string
value. When a list is provided it is indexed into using a `cycle` access
pattern based on the nesting of the current `block quote`. This allows
users to change both the color and the icon used based on how deeply
nested the block quote is.
Add unit tests for updated quote logic since it's not trivial.
0 commit comments