@cccsaurora/howler-ui 2.19.0-dev.912 → 2.19.0-dev.913
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -122,8 +122,15 @@ const Markdown = ({ md, components = {}, disableLinks = false }) => {
|
|
|
122
122
|
if (props.href.startsWith('#')) {
|
|
123
123
|
return _jsx("a", { ...props, children: children });
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
let parsed = null;
|
|
126
|
+
try {
|
|
127
|
+
parsed = new URL(props.href);
|
|
128
|
+
}
|
|
129
|
+
catch (e) {
|
|
130
|
+
// eslint-disable-next-line no-console
|
|
131
|
+
console.warn('error when parsing URL:', e);
|
|
132
|
+
}
|
|
133
|
+
if (parsed?.hostname.endsWith('gc.ca')) {
|
|
127
134
|
return _jsx("a", { ...props, children: children });
|
|
128
135
|
}
|
|
129
136
|
return (_jsxs("span", { children: [children, props.href !== children && ` (${props.href})`] }));
|