File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 16
16
print ()
17
17
print ("HTML" )
18
18
print ("=====================================" )
19
- print ('From the <a href="">GitHub release page</a>:\n <blockquote> ' )
19
+ print ('<p><em> From the <a href="">GitHub release page</a>:</em></p> \n ' )
20
20
print (html (source ))
21
- print ("</blockquote>" )
22
21
23
22
24
23
class AdafruitBBCodeRenderer (mistune .renderers .BaseRenderer ):
@@ -59,17 +58,19 @@ def double_emphasis(self, text):
59
58
return "[b]{}[/b]" .format (text )
60
59
61
60
def emphasis (self , text ):
62
- return "[b ]{}[/b ]" .format (text )
61
+ return "[i ]{}[/i ]" .format (text )
63
62
64
63
def strong (self , text ):
65
- return "[i]{}[/i]" .format (text )
64
+ return "[b]{}[/b]" .format (text )
65
+
66
+ def finalize (self , data ):
67
+ return "" .join (data )
66
68
67
69
68
70
bbcode = mistune .create_markdown (renderer = AdafruitBBCodeRenderer ())
69
71
70
72
print ()
71
73
print ("BBCode" )
72
74
print ("=====================================" )
73
- print ("From the [url=]GitHub release page[/url]:\n [quote] " )
75
+ print ("[i] From the [url=]GitHub release page[/url]:[/i] \n " )
74
76
print (bbcode (source ))
75
- print ("[/quote]" )
You can’t perform that action at this time.
0 commit comments