Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const markdownItRegExp = require('markdown-it-regexp');

// regular expression to match the icon patterns
const ICON_REGEXP
= /:(fa[brs]|fa-brands|fa-solid|glyphicon|octicon|octiconlight|mi[forst]|bi)-([a-z-]+)~?([a-z-]+)?:/;
= /:(fa[brs]|fa-brands|fa-solid|glyphicon|octicon|octiconlight|mi[forst]|bi)-([a-z0-9-]+)~?([a-z0-9-]+)?:/;

// function to get the octicon icons
function getOcticonIcon(iconName: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ test('should render all Bootstrap icons correctly', () => {
// Basic bootstrap icons, with dashes
expect(md.renderInline(':bi-house:')).toBe('<i class="bi-house"></i>');
expect(md.renderInline(':bi-arrow-left:')).toBe('<i class="bi-arrow-left"></i>');
expect(md.renderInline(':bi-backpack2:')).toBe('<i class="bi-backpack2"></i>');
expect(md.renderInline(':bi-backpack2-fill:')).toBe('<i class="bi-backpack2-fill"></i>');
});

test('should handle multiple icons and complex scenarios', () => {
Expand Down