@@ -362,11 +362,11 @@ def get_conv_fn(self, tag_name):
362
362
if not self .should_convert_tag (tag_name ):
363
363
return None
364
364
365
- # Handle headings with _convert_hn () function
365
+ # Handle headings with convert_hn () function
366
366
match = re_html_heading .match (tag_name )
367
367
if match :
368
368
n = int (match .group (1 ))
369
- return lambda el , text , parent_tags : self ._convert_hn (n , el , text , parent_tags )
369
+ return lambda el , text , parent_tags : self .convert_hn (n , el , text , parent_tags )
370
370
371
371
# For other tags, look up their conversion function by tag name
372
372
convert_fn_name = "convert_%s" % re_make_convert_fn_name .sub ('_' , tag_name )
@@ -509,12 +509,12 @@ def convert_dt(self, el, text, parent_tags):
509
509
510
510
return '\n \n %s\n ' % text
511
511
512
- def _convert_hn (self , n , el , text , parent_tags ):
513
- """ Method name prefixed with _ to prevent <hn> to call this """
512
+ def convert_hn (self , n , el , text , parent_tags ):
513
+ # convert_hn() converts <h#> tags, where # is any integer
514
514
if '_inline' in parent_tags :
515
515
return text
516
516
517
- # prevent MemoryErrors in case of very large n
517
+ # Markdown does not support heading depths of n > 6
518
518
n = max (1 , min (6 , n ))
519
519
520
520
style = self .options ['heading_style' ].lower ()
0 commit comments