-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexamples.py
69 lines (59 loc) · 1.04 KB
/
examples.py
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
import sourcetypes
from sourcetypes import html, sql
test_html: html = """
<html>
<body>
<h1>Inline syntax highlighting!</h1>
</body>
</html>
"""
test_sql: sql = """
SELECT test
FROM a_table
"""
test_css: sourcetypes.css = """
body {
font-weight: bold;
color: #f00;
}
"""
test_javascript: sourcetypes.javascript = """
function() {
var text = "Some Text";
alert(text)
}
"""
test_typescript: sourcetypes.ts = """
function() {
var text = "Some Text";
alert(text)
}
"""
test_jsx: sourcetypes.jsx = """
function() {
const element = <h1>Hello, world!</h1>;
return element
}
"""
test_tsx: sourcetypes.tsx = """
function() {
const element = <h1>Hello, world!</h1>;
return element
}
"""
test_python: sourcetypes.python = """
test = "123"
def my_function():
return f"My string: {test}"
"""
test_sql2: sourcetypes.sql = """
SELECT test
FROM a_table
"""
test_html2: "html" = """
<html>
<body>
<h1>Inline syntax highlighting</h1>
</body>
</html>
"""