forked from creationix/lit-hoedown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
91 lines (68 loc) · 2.29 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<meta charset="utf8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/tomorrow-night-bright.min.css">
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/languages/lua.min.js"></script>
<script>hljs.initHighlightingOnLoad()</script>
<h1>The largest heading (an <h1> tag)</h1>
<h2>The second largest heading (an <h2> tag)</h2>
<p>…</p>
<h6>The 6th largest heading (an <h6> tag)</h6>
<p>In the words of Abraham Lincoln:</p>
<blockquote>
<p>Pardon my french</p>
</blockquote>
<p><em>This text will be italic</em></p>
<p><strong>This text will be bold</strong></p>
<p><strong>Everyone <u>must</u> attend the meeting at 5 o'clock today.</strong></p>
<pre><code class="language-lua">local ffi = require('ffi')
local hd = require('hoedown')
local bundle = require('luvi').bundle
local flags = hd.HOEDOWN_HTML_ESCAPE
local renderer = hd.hoedown_html_renderer_new(flags, 0)
local extensions = bit.bor(
hd.HOEDOWN_EXT_BLOCK,
hd.HOEDOWN_EXT_SPAN
)
local document = hd.hoedown_document_new(renderer, extensions, 16);
local html = hd.hoedown_buffer_new(16)
local markdown = bundle.readfile("sample.md")
hd.hoedown_document_render(document, html, markdown, #markdown);
local string = ffi.string(html.data, html.size)
</code></pre>
<p>\[
\begin{align*}
& \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i, \sum_{j=1}^n y_je_j \right)
= \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i, e_j) = \
& (x_1, \ldots, x_n) \left( \begin{array}{ccc}
\phi(e_1, e_1) & \cdots & \phi(e_1, e_n) \
\vdots & \ddots & \vdots \
\phi(e_n, e_1) & \cdots & \phi(e_n, e_n)
\end{array} \right)
\left( \begin{array}{c}
y_1 \
\vdots \
y_n
\end{array} \right)
\end{align*}
\]</p>
<p>Does it work with <q>smart quotes?</q></p>
<p>Isn’t it nice?</p>
<table>
<thead>
<tr>
<th>First Header</th>
<th>Second Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
</tbody>
</table>