@ndlib/component-library 0.0.128 → 0.0.129
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.
|
@@ -31,7 +31,7 @@ export const Alerts = (_a) => {
|
|
|
31
31
|
const { alerts, dismiss } = useAlerts(pageAlerts);
|
|
32
32
|
return (_jsx(Box, Object.assign({}, rest, { children: alerts.map((alert, i) => {
|
|
33
33
|
const { type, description } = alert;
|
|
34
|
-
return (_jsx(Alert, { type: type, description: description, sx: Object.assign({ mt: i ? '4px' : 0 }, alertStyles), dismiss: () => {
|
|
34
|
+
return (_jsx(Alert, { type: type, description: description, "data-nosnippet": true, sx: Object.assign({ mt: i ? '4px' : 0 }, alertStyles), dismiss: () => {
|
|
35
35
|
dismiss(alert.uuid);
|
|
36
36
|
} }, i));
|
|
37
37
|
}) })));
|
|
@@ -55,7 +55,7 @@ sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
|
55
55
|
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
56
56
|
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
|
|
57
57
|
reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
58
|
-
nulla pariatur.
|
|
58
|
+
nulla pariatur. [block quote link](test.com)
|
|
59
59
|
|
|
60
60
|

|
|
61
61
|
|
|
@@ -70,7 +70,7 @@ While Gura says that the exhibit was inspired by the themes of the Medieval conf
|
|
|
70
70
|
|
|
71
71
|
To tell that story, Gura decided to give each of the seven cases housing this exhibit a theme.
|
|
72
72
|
|
|
73
|
-
> “I think it's an exciting way to create a journey through time and space using the objects themselves as the primary storyteller,” he said. “They will drive the narrative from case to case. You can be exposed to different things that the average person never really thought about.”
|
|
73
|
+
> “I think it's an exciting way to create a journey through time and space using the objects themselves as the primary storyteller,” he said. [test](test.com) “They will drive the narrative from case to case. You can be exposed to different things that the average person never really thought about.”
|
|
74
74
|
`;
|
|
75
75
|
export const Default = {
|
|
76
76
|
render: (args) => _jsx(Markdown, Object.assign({}, args)),
|
|
@@ -81,7 +81,9 @@ export const Default = {
|
|
|
81
81
|
const htmlContent = `
|
|
82
82
|
## HTML Content
|
|
83
83
|
<p style='color: red;'>hello world </p>
|
|
84
|
-
|
|
84
|
+
|
|
85
|
+
> Block quote [block quote link](test.com)
|
|
86
|
+
|
|
85
87
|
<img
|
|
86
88
|
style="width: 300px"
|
|
87
89
|
src="https://s3.amazonaws.com/resources.library.nd.edu/images/website/search.banner.fall.jpg"
|
|
@@ -42,7 +42,9 @@ While Gura says that the exhibit was inspired by the themes of the Medieval conf
|
|
|
42
42
|
|
|
43
43
|
To tell that story, Gura decided to give each of the seven cases housing this exhibit a theme.
|
|
44
44
|
|
|
45
|
-
> “I think it's an exciting way to create a journey through time
|
|
45
|
+
> “I think it's an exciting way to create a journey through time
|
|
46
|
+
> and space using the objects themselves as the primary storyteller,” he said. “They will drive the narrative from case to case. You can be exposed to different things that
|
|
47
|
+
> the average person never really thought about.” [block quote link](test.com)
|
|
46
48
|
|
|
47
49
|

|
|
48
50
|
|
|
@@ -90,6 +92,9 @@ describe('Markdown', () => {
|
|
|
90
92
|
expect(getByRole('link', {
|
|
91
93
|
name: 'https://this-should-be-auto-linked.nd.edu',
|
|
92
94
|
})).toBeInTheDocument();
|
|
95
|
+
expect(getByRole('link', {
|
|
96
|
+
name: 'block quote link',
|
|
97
|
+
})).toBeInTheDocument();
|
|
93
98
|
const images = container.getElementsByTagName('img');
|
|
94
99
|
let inlineImageCount = 0;
|
|
95
100
|
for (const image of images) {
|
|
@@ -54,7 +54,20 @@ const parseBlockquotes = (content) => {
|
|
|
54
54
|
if (isAddingBlockquote) {
|
|
55
55
|
newContent.push('</blockquote>');
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
let newString = newContent.join('\n');
|
|
58
|
+
const blockquoteRegex = /<blockquote>(.*?)<\/blockquote>/gs;
|
|
59
|
+
const blockquotes = newString.match(blockquoteRegex);
|
|
60
|
+
blockquotes === null || blockquotes === void 0 ? void 0 : blockquotes.forEach((blockquote) => {
|
|
61
|
+
const linkRegex = /\[(.*?)\]\((.*?)\)/gs;
|
|
62
|
+
const links = blockquote.match(linkRegex);
|
|
63
|
+
let newBlockquote = blockquote;
|
|
64
|
+
links === null || links === void 0 ? void 0 : links.forEach((link) => {
|
|
65
|
+
const newLink = link.replace(/\[(.*?)\]\((.*?)\)/, '<a href="$2">$1</a>');
|
|
66
|
+
newBlockquote = newBlockquote.replace(link, newLink);
|
|
67
|
+
});
|
|
68
|
+
newString = newString.replace(blockquote, newBlockquote);
|
|
69
|
+
});
|
|
70
|
+
return newString;
|
|
58
71
|
};
|
|
59
72
|
const defaultFloatImageStyles = {
|
|
60
73
|
float: 'right',
|