-
- Note content without title
+
+
+
+ Примечание
+
+
+ Note content without title
+
+
`;
exports[`Alerts should render siblings notes 1`] = `
-
-
- Note title 1
-
-
-
- Note content 1
+
-
-
- Note title 2
-
-
-
- Note content 2
+
`;
exports[`Alerts should render simple note 1`] = `
-
-
- Note title
-
-
-
- Note content
+
`;
exports[`Alerts should render title with format 1`] = `
-
-
-
- Italic note title
-
-
-
-
- Content
+
+
+
+
+ Italic note title
+
+
`;
diff --git a/test/__snapshots__/term.test.ts.snap b/test/__snapshots__/term.test.ts.snap
index 7597df1d..343d4149 100644
--- a/test/__snapshots__/term.test.ts.snap
+++ b/test/__snapshots__/term.test.ts.snap
@@ -20,7 +20,7 @@ exports[`Terms Should create term in code with definition template 1`] = `
Web
-
+
-
-
- |
-
- {{variable | length}} column 1, row 1
-
- |
-
-
- Cell in column 2, row 1
-
- |
-
-
- |
-
- Cell in column 1, row 2
-
- |
-
-
- Cell in column 2, row 2
-
- |
-
-
-
+
+
+
+
+ |
+
+ {{variable | length}} column 1, row 1
+
+ |
+
+
+ Cell in column 2, row 1
+
+ |
+
+
+ |
+
+ Cell in column 1, row 2
+
+ |
+
+
+ Cell in column 2, row 2
+
+ |
+
+
+
+
`;
diff --git a/test/table/table.test.ts b/test/table/table.test.ts
index c09901b6..332929f2 100644
--- a/test/table/table.test.ts
+++ b/test/table/table.test.ts
@@ -14,7 +14,8 @@ const transformYfm = (text: string) => {
describe('Table plugin', () => {
it('should render simple inline table', () => {
expect(transformYfm('#|\n||1|2||\n||3|4||\n|#')).toBe(
- '\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -33,7 +34,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ ' \n',
);
});
it('should render simple table', () => {
@@ -49,7 +51,8 @@ describe('Table plugin', () => {
'|#',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -76,7 +79,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should render simple table with attrs', () => {
@@ -92,7 +96,8 @@ describe('Table plugin', () => {
'|# {.test .name #id data-diplodoc-large-table data-wide-preview="true"}',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -119,7 +124,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should render table between paragraphs', () => {
@@ -138,6 +144,7 @@ describe('Table plugin', () => {
),
).toBe(
'
Text
\n' +
+ '
\n' +
'
\n' +
'\n' +
'\n' +
@@ -158,6 +165,7 @@ describe('Table plugin', () => {
'
\n' +
'\n' +
'
\n' +
+ '
\n' +
'
Text
\n',
);
});
@@ -174,7 +182,8 @@ describe('Table plugin', () => {
'|#',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -201,7 +210,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should render table with block elements', () => {
@@ -227,7 +237,8 @@ describe('Table plugin', () => {
'|#\n',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -269,7 +280,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should render two tables', () => {
@@ -290,7 +302,8 @@ describe('Table plugin', () => {
'|#',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -310,6 +323,8 @@ describe('Table plugin', () => {
' |
\n' +
'\n' +
'
\n' +
+ '
\n' +
+ '\n' +
'
\n' +
'\n' +
'\n' +
@@ -329,7 +344,8 @@ describe('Table plugin', () => {
'\n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should not render table inside code', () => {
@@ -352,7 +368,8 @@ describe('Table plugin', () => {
'|#',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -378,7 +395,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should not render table without close token', () => {
@@ -466,7 +484,8 @@ describe('Table plugin', () => {
'|#',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -474,6 +493,7 @@ describe('Table plugin', () => {
' | \n' +
'\n' +
' test \n' +
+ '\n' +
' \n' +
'\n' +
'\n' +
@@ -494,6 +514,7 @@ describe('Table plugin', () => {
' \n' +
'\n' +
' \n' +
+ ' \n' +
'test \n' +
' | \n' +
'
\n' +
@@ -506,7 +527,8 @@ describe('Table plugin', () => {
'\n' +
'\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should render table with spaces after new line', () => {
@@ -520,7 +542,8 @@ describe('Table plugin', () => {
' |#',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -539,7 +562,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should add empty cells', () => {
@@ -556,7 +580,8 @@ describe('Table plugin', () => {
'|#',
),
).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -588,7 +613,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should render table inside quote on each line', () => {
@@ -605,6 +631,7 @@ describe('Table plugin', () => {
),
).toBe(
'
\n' +
+ '\n' +
'
\n' +
'\n' +
'\n' +
@@ -633,12 +660,14 @@ describe('Table plugin', () => {
'
\n' +
'\n' +
'
\n' +
+ '
\n' +
'
\n',
);
});
it('should correct render escaped cells', () => {
expect(transformYfm('#|\n||1 \\| 1.1|2||\n||3|4||\n|#')).toBe(
- '
\n' +
+ '\n' +
+ '
\n' +
'\n' +
'\n' +
'| \n' +
@@ -657,7 +686,8 @@ describe('Table plugin', () => {
' | \n' +
'
\n' +
'\n' +
- '
\n',
+ '
\n' +
+ '
\n',
);
});
it('should correct render escaped rows', () => {
@@ -669,7 +699,8 @@ describe('Table plugin', () => {
'|#',
),
).toBe(
- '