@@ -156,12 +156,10 @@ private function parseDelimiter($block)
156
156
157
157
private function parseCode ($ block )
158
158
{
159
- $ wrapper = $ this ->dom ->createElement ('div ' );
160
-
161
- $ wrapper ->setAttribute ('class ' , "{$ this ->prefix }-code " );
162
-
163
159
$ pre = $ this ->dom ->createElement ('pre ' );
164
160
161
+ $ pre ->setAttribute ('class ' , $ this ->addClass ($ block ->type ));
162
+
165
163
$ code = $ this ->dom ->createElement ('code ' );
166
164
167
165
$ content = new DOMText ($ block ->data ->code );
@@ -170,9 +168,7 @@ private function parseCode($block)
170
168
171
169
$ pre ->appendChild ($ code );
172
170
173
- $ wrapper ->appendChild ($ pre );
174
-
175
- $ this ->dom ->appendChild ($ wrapper );
171
+ $ this ->dom ->appendChild ($ pre );
176
172
}
177
173
178
174
private function parseParagraph ($ block )
@@ -431,12 +427,15 @@ private function parseStandardImage($block)
431
427
432
428
private function parseQuote ($ block )
433
429
{
430
+ $ alignment = isset ($ block ->data ->alignment ) ? $ block ->data ->alignment : false ;
431
+
432
+ $ class = $ this ->addClass ($ block ->type , $ alignment );
433
+
434
434
$ figure = $ this ->dom ->createElement ('figure ' );
435
- $ figure ->setAttribute ('class ' , "{ $ this -> prefix } -quote " );
435
+ $ figure ->setAttribute ('class ' , $ class );
436
436
437
437
$ blockquote = $ this ->dom ->createElement ('blockquote ' );
438
438
439
- $ blockquote ->setAttribute ('class ' , "{$ this ->prefix }-blockquote " );
440
439
$ blockquote ->appendChild ($ this ->html5 ->loadHTMLFragment ($ block ->data ->text ));
441
440
$ figure ->appendChild ($ blockquote );
442
441
0 commit comments