Merged
Conversation
Obsidian lowercases the data-callout attribute when rendering callouts, so types with uppercase letters would fail the admonitions[type] lookup. Instead of rejecting uppercase input, normalize to lowercase at storage time (addAdmonition) and in validateType for correct duplicate detection. Also migrate any existing uppercase types in userAdmonitions on load. Closes #356
9 tasks
6 tasks
ebullient
added a commit
that referenced
this pull request
Apr 17, 2026
After the lowercase normalization migration (PR #371), notes with mixed-case callout syntax (e.g. > [!Test]) fail to apply custom admonition styling because data-callout preserves the original case while settings keys and CSS selectors are now lowercase. Fixes #388 Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
addAdmonition), since Obsidian lowercasesdata-calloutwhen rendering callouts — a type stored as"Warning"would never matchcallout.dataset.callout === "warning".validateTypealso normalizes before the duplicate check, so"Note"and"note"are treated as the same type.loadSettingsre-keys any existing uppercase types to their lowercase equivalents.Closes #356 — went with normalization instead of rejection for better UX.
Test plan
Warning) — it should be stored and render aswarningwarningafterWarningalready exists — duplicate check should firenpm run buildpasses cleanly🤖 Generated with Claude Code