2
2
3
3
import re
4
4
from importlib import import_module
5
- from CommonMark import common
6
- from CommonMark .common import unescape_string
7
- from CommonMark .inlines import InlineParser
8
- from CommonMark .node import Node
9
- from CommonMark .utils import to_camel_case
5
+ from commonmark import common
6
+ from commonmark .common import unescape_string
7
+ from commonmark .inlines import InlineParser
8
+ from commonmark .node import Node
9
+ from commonmark .utils import to_camel_case
10
10
11
11
12
12
CODE_INDENT = 4
@@ -610,12 +610,12 @@ def add_child(self, tag, offset):
610
610
""" Add block of type tag as a child of the tip. If the tip can't
611
611
accept children, close and finalize it and try its parent,
612
612
and so on til we find a block that can accept children."""
613
- block_class = getattr (import_module ('CommonMark .blocks' ),
613
+ block_class = getattr (import_module ('commonmark .blocks' ),
614
614
to_camel_case (self .tip .t ))
615
615
while not block_class .can_contain (tag ):
616
616
self .finalize (self .tip , self .line_number - 1 )
617
617
block_class = getattr (
618
- import_module ('CommonMark .blocks' ),
618
+ import_module ('commonmark .blocks' ),
619
619
to_camel_case (self .tip .t ))
620
620
621
621
column_number = offset + 1
@@ -731,7 +731,7 @@ def incorporate_line(self, ln):
731
731
732
732
self .find_next_nonspace ()
733
733
block_class = getattr (
734
- import_module ('CommonMark .blocks' ),
734
+ import_module ('commonmark .blocks' ),
735
735
to_camel_case (container .t ))
736
736
rv = block_class .continue_ (self , container )
737
737
if rv == 0 :
@@ -757,7 +757,7 @@ def incorporate_line(self, ln):
757
757
self .all_closed = (container == self .oldtip )
758
758
self .last_matched_container = container
759
759
760
- block_class = getattr (import_module ('CommonMark .blocks' ),
760
+ block_class = getattr (import_module ('commonmark .blocks' ),
761
761
to_camel_case (container .t ))
762
762
matched_leaf = container .t != 'paragraph' and block_class .accepts_lines
763
763
starts = self .block_starts
@@ -824,7 +824,7 @@ def incorporate_line(self, ln):
824
824
cont .last_line_blank = last_line_blank
825
825
cont = cont .parent
826
826
827
- block_class = getattr (import_module ('CommonMark .blocks' ),
827
+ block_class = getattr (import_module ('commonmark .blocks' ),
828
828
to_camel_case (t ))
829
829
if block_class .accepts_lines :
830
830
self .add_line ()
@@ -853,7 +853,7 @@ def finalize(self, block, line_number):
853
853
above = block .parent
854
854
block .is_open = False
855
855
block .sourcepos [1 ] = [line_number , self .last_line_length ]
856
- block_class = getattr (import_module ('CommonMark .blocks' ),
856
+ block_class = getattr (import_module ('commonmark .blocks' ),
857
857
to_camel_case (block .t ))
858
858
block_class .finalize (self , block )
859
859
0 commit comments