@@ -97,6 +97,37 @@ def test_multiple_platforms_section(self):
9797 expected_output = '<p>some content\n shown</p>'
9898 self .assertEqual (expected_output , html )
9999
100+ def test_platform_sections_with_spaces (self ):
101+ text = ('@![asdf, qwerty]\n '
102+ 'some content\n shown\n \n '
103+ '!@\n ' )
104+
105+ html = markdown .markdown (
106+ text ,
107+ extension_configs = self .build_config_for_platform_section ('qwerty' ),
108+ extensions = self .MARKDOWN_EXTENSIONS ,
109+ output_format = 'html5'
110+ )
111+ expected_output = '<p>some content\n shown</p>'
112+ self .assertEqual (expected_output , html )
113+
114+ def test_platform_section_with_space (self ):
115+ text = ('@![asdf, qwerty, another platform]\n '
116+ 'some content\n shown\n \n '
117+ '!@\n '
118+ '@![another platform]\n '
119+ 'some extra content\n shown\n \n '
120+ '!@\n ' )
121+
122+ html = markdown .markdown (
123+ text ,
124+ extension_configs = self .build_config_for_platform_section ('another platform' ),
125+ extensions = self .MARKDOWN_EXTENSIONS ,
126+ output_format = 'html5'
127+ )
128+ expected_output = '<p>some content\n shown</p>\n <p>some extra content\n shown</p>'
129+ self .assertEqual (expected_output , html )
130+
100131 def test_multiple_sections (self ):
101132 text = ('@![asdf,QwErTy]\n '
102133 'some content\n not shown\n \n '
0 commit comments