Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e1bd0fc

Browse files
committed
Fix make-html.py
1 parent 0e00c85 commit e1bd0fc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎make-html.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,26 @@
3030

3131
import argparse
3232
import os
33+
import platform
3334
import posixpath
3435
import shutil
3536
import sys
3637
import textwrap
3738
import webbrowser
3839

40+
if platform.system() == 'Windows':
41+
python = 'py'
42+
else:
43+
python = 'python3'
44+
3945
try:
4046
import mistune
4147
except ImportError:
42-
import platform
43-
if platform.system() == 'Windows':
44-
python = 'py'
45-
else:
46-
python = 'python3'
4748
print("mistune isn't installed.", file=sys.stderr)
4849
print("You can install it by running this command on a terminal or ")
4950
print("command prompt:")
5051
print()
51-
print(" %s -m pip install --user mistune" % python)
52+
print(" %s -m pip install mistune" % python)
5253
sys.exit(1)
5354

5455
try:
@@ -112,7 +113,7 @@ def fix_filename(filename):
112113
return filename
113114

114115

115-
class TutorialRenderer(mistune.Renderer):
116+
class TutorialRenderer(mistune.HTMLRenderer):
116117

117118
def __init__(self, pygments_style):
118119
super().__init__()
@@ -226,8 +227,7 @@ def main():
226227
if pygments is None:
227228
print("Pygments isn't installed. You can install it like this:")
228229
print()
229-
print(">>> import pip")
230-
print(">>> pip.main(['install', '--user', 'pygments'])")
230+
print(" %s -m pip install pygments" % python)
231231
print()
232232
print("You can also continue without Pygments, but the code examples")
233233
print("will not be colored.")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /