Skip to content

Commit 36cb94d

Browse files
committed
test - add a test using lua error
1 parent 3c9422e commit 36cb94d

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Trimming newlines in raw block
3+
format: latex
4+
filters:
5+
- path: checkRaw.lua
6+
at: post-ast
7+
---
8+
9+
```{=html}
10+
<table>
11+
<thead>
12+
<tr>
13+
<th style="text-align:right;"> Sepal.Length </th>
14+
<th style="text-align:right;"> Sepal.Width </th>
15+
</tr>
16+
</thead>
17+
<tbody>
18+
<tr>
19+
<td style="text-align:right;"> 5.1 </td>
20+
<td style="text-align:right;"> 3.5 </td>
21+
</tr>
22+
</tbody>
23+
</table>
24+
25+
```
26+
27+
```{=html}
28+
29+
<table>
30+
<thead>
31+
<tr>
32+
<th style="text-align:right;"> Sepal.Length </th>
33+
<th style="text-align:right;"> Sepal.Width </th>
34+
</tr>
35+
</thead>
36+
<tbody>
37+
<tr>
38+
<td style="text-align:right;"> 5.1 </td>
39+
<td style="text-align:right;"> 3.5 </td>
40+
</tr>
41+
</tbody>
42+
</table>
43+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function RawBlock(raw)
2+
if raw.format == 'html' and raw.text == '\n' then
3+
error("New line in raw block should have been removed")
4+
crash_with_stack_trace()
5+
end
6+
end

0 commit comments

Comments
 (0)