Skip to content

Commit b9e30c0

Browse files
committed
requirements.txtを最新のバージョンに上げた
1 parent 36b7bc0 commit b9e30c0

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

docker/requirements.txt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
flake8==2.2.4
2-
flake8-import-order==0.7
3-
hacking==0.10.2
4-
htmlmin==0.1.5
1+
flake8==3.7.9
2+
flake8-import-order==0.18.1
3+
hacking==2.0.0
4+
htmlmin==0.1.12
55
Jinja2==2.11.1
6-
Markdown==2.3.1
7-
MarkupSafe==0.23
8-
mccabe==0.2.1
9-
pbr==1.8.1
10-
pep8==1.5.7
11-
pyflakes==0.8.1
12-
Pygments==1.6
13-
six==1.10.0
14-
regex==2017.4.23
6+
Markdown==3.2.1
7+
Pygments==2.5.2
8+
regex==2020.2.20

run.py

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

44
from datetime import datetime
@@ -60,26 +60,33 @@ def make_html_path(path):
6060
def md_to_html(md_data, path, hrefs=None, global_qualify_list=None):
6161
paths = path.split('/')
6262

63-
qualified_fenced_code = 'markdown_to_html.qualified_fenced_code(global_qualify_list={})'.format(global_qualify_list)
64-
html_attribute = 'markdown_to_html.html_attribute(base_url={base_url}, base_path={base_path}, full_path={full_path}, extension={extension})'.format(
65-
base_url=settings.BASE_URL,
66-
base_path='/'.join(paths[:-1]),
67-
full_path=path + '.md',
68-
extension='.html',
69-
)
63+
extension_configs = {}
64+
extension_configs['markdown_to_html.qualified_fenced_code'] = {
65+
'global_qualify_list': global_qualify_list
66+
}
67+
extension_configs['markdown_to_html.html_attribute'] = {
68+
'base_url': settings.BASE_URL,
69+
'base_path': '/'.join(paths[:-1]),
70+
'full_path': path + '.md',
71+
'extension': '.html',
72+
}
73+
extension_configs['codehilite'] = {
74+
'noclasses': False
75+
}
7076
# footer = 'markdown_to_html.footer(url={url})'.format(
7177
# url=settings.EDIT_URL_FORMAT.format(
7278
# paths=path + '.md',
7379
# )
7480
# )
7581

76-
md = markdown.Markdown([
77-
'markdown_to_html.tables',
82+
md = markdown.Markdown(extensions=[
83+
'tables',
7884
'markdown_to_html.meta',
7985
'markdown_to_html.mathjax',
80-
qualified_fenced_code,
81-
'codehilite(noclasses=False)',
82-
html_attribute])
86+
'markdown_to_html.qualified_fenced_code',
87+
'codehilite',
88+
'markdown_to_html.html_attribute'],
89+
extension_configs=extension_configs)
8390
md._html_attribute_hrefs = hrefs
8491

8592
html = md.convert(md_data)

0 commit comments

Comments
 (0)