Skip to content

Commit

Permalink
fix: mixed case custom callout types are supported (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathonius authored Apr 19, 2023
1 parent 3e17d60 commit 628179e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/callout/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ export default class CalloutManager extends Component {
? `--callout-color: ${admonition.color};`
: "";
if (admonition.icon.type == "obsidian") {
rule = `.callout[data-callout="${admonition.type}"] {
rule = `.callout[data-callout="${admonition.type.toLowerCase()}"] {
${color}
--callout-icon: ${admonition.icon.name}; /* Icon name from the Obsidian Icon Set */
}`;
} else {
rule = `.callout[data-callout="${admonition.type}"] {
rule = `.callout[data-callout="${admonition.type.toLowerCase()}"] {
${color}
--callout-icon: '${(
this.plugin.iconManager.getIconNode(admonition.icon)?.outerHTML ??
Expand Down

0 comments on commit 628179e

Please sign in to comment.