Skip to content

Commit

Permalink
fix rendering bug for icons with slashes because markdown is balls
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Apr 27, 2024
1 parent ff65881 commit 6bab75d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/_shared/components/card-text/card-text.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export class CardTextComponent {
renderer.codespan = (text: string) => {
if (text.includes(':')) {
const [type, subtype] = text.split(':');
const fileName = `${type}-${subtype}`.split('\\').join('');

return `<img src="${environment.baseUrl}/symbols/${type}-${subtype}.webp" class="inline-icon" title="${subtype}" />`;
return `<img src="${environment.baseUrl}/symbols/${fileName}.webp" class="inline-icon" title="${subtype}" />`;
}

return `<pre>${text}</pre>`;
Expand Down

0 comments on commit 6bab75d

Please sign in to comment.