Syntax highlighting 색상 커스텀 | 2023-02-05
Syntax highlighting 색상 커스텀을 했다.
java:
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
import javax.sql.DataSource;
import java.sql.Connection;
@SpringBootTest
@Slf4j
class DBTests {
@Qualifier("db1DataSource")
@Setter(onMethod_ = {@Autowired})
private DataSource db1DataSource;
@Qualifier("db2DataSource")
@Setter(onMethod_ = {@Autowired})
private DataSource db2DataSource;
@Test
public void testDataSourceConnection() {
try {
Connection con1 = db1DataSource.getConnection();
Connection con2 = db2DataSource.getConnection();
log.info("" + con1);
log.info("" + con2);
} catch (Exception e) {
fail(e.getMessage());
}
}
}
sql:
1
2
3
4
5
6
7
8
9
10
select tmp.bno, title, content, regdate, updatedate
from tb_blog as b
join (select bno
from tb_blog
where 1 = 1
and title like concat('%', 'zz', '%')
or content like concat('%', 'zz', '%')
order by bno desc
limit 10 offset 10) as tmp
on tmp.bno = b.bno;
js:
1
2
3
4
5
6
7
8
9
10
11
12
function sayHello(name) {
if (!name) {
console.log('Hello World');
} else {
console.log(`Hello ${name}`);
}
}
function myFunc(a, b) {
return a * b;
}
document.getElementById('demo').innerHTML = myFunc(4, 3);
python:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
def func():
# function body
print("hello world!")
def setup(app):
# enable Pygments json lexer
try:
import pygments
if pygments.__version__ >= '1.5':
# use JSON lexer included in recent versions of Pygments
from pygments.lexers import JsonLexer
else:
# use JSON lexer from pygments-json if installed
from pygson.json_lexer import JSONLexer as JsonLexer
except ImportError:
pass # not fatal if we have old (or no) Pygments and no pygments-json
else:
app.add_lexer('json', JsonLexer())
return {"parallel_read_safe": True}
words = ['cat', 'window', 'defenestrate']
for w in words:
print w, len(w)