File tree 4 files changed +49
-2
lines changed
4 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 9
9
- [ pull #570 ] Fix syntax warnings in test suite
10
10
- [ pull #572 ] Process inline tags as HTML blocks when they span multiple lines (#571 )
11
11
- [ pull #573 ] Add new LaTeX Extra
12
+ - [ pull #576 ] Fix ` html ` , ` head ` and ` body ` tags being wrapped in ` <p> ` tags (#575 )
12
13
13
14
14
15
## python-markdown2 2.4.13
Original file line number Diff line number Diff line change @@ -814,7 +814,7 @@ def _detab(self, text):
814
814
# _block_tags_b. This way html5 tags are easy to keep track of.
815
815
_html5tags = '|article|aside|header|hgroup|footer|nav|section|figure|figcaption'
816
816
817
- _block_tags_a = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del|style'
817
+ _block_tags_a = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del|style|html|head|body '
818
818
_block_tags_a += _html5tags
819
819
820
820
_strict_tag_block_re = re .compile (r"""
@@ -2773,7 +2773,7 @@ class Latex(Extra):
2773
2773
2774
2774
_single_dollar_re = re .compile (r'(?<!\$)\$(?!\$)(.*?)\$' )
2775
2775
_double_dollar_re = re .compile (r'\$\$(.*?)\$\$' , re .DOTALL )
2776
-
2776
+
2777
2777
# Ways to escape
2778
2778
_pre_code_block_re = re .compile (r"<pre>(.*?)</pre>" , re .DOTALL ) # Wraped in <pre>
2779
2779
_triple_re = re .compile (r'```(.*?)```' , re .DOTALL ) # Wrapped in a code block ```
Original file line number Diff line number Diff line change
1
+ < html >
2
+
3
+ <!-- Comment please ignore -->
4
+
5
+ <!-- Multi
6
+ line Comment
7
+ please ignore -->
8
+
9
+
10
+ < body >
11
+ content here
12
+
13
+ < img src ="some_img.jpg " alt ="there is supposed to be an image here " width ="500 " height ="600 ">
14
+
15
+ Now some bullets:
16
+
17
+ * one
18
+ * two
19
+
20
+ </ body >
21
+
22
+
23
+ </ html >
Original file line number Diff line number Diff line change
1
+ <html>
2
+
3
+ <!-- Comment please ignore -->
4
+
5
+ <!-- Multi
6
+ line Comment
7
+ please ignore -->
8
+
9
+
10
+ <body>
11
+ content here
12
+
13
+ <img src="some_img.jpg" alt="there is supposed to be an image here" width="500" height="600">
14
+
15
+ Now some bullets:
16
+
17
+ * one
18
+ * two
19
+
20
+ </body>
21
+
22
+
23
+ </html>
You can’t perform that action at this time.
0 commit comments