Index: trunk/phase3/includes/api/ApiExpandTemplates.php |
— | — | @@ -61,6 +61,10 @@ |
62 | 62 | global $wgParser; |
63 | 63 | $options = new ParserOptions(); |
64 | 64 | |
| 65 | + if ( $params['includecomments'] ) { |
| 66 | + $options->setRemoveComments( false ); |
| 67 | + } |
| 68 | + |
65 | 69 | if ( $params['generatexml'] ) { |
66 | 70 | $wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS ); |
67 | 71 | $dom = $wgParser->preprocessToDom( $params['text'] ); |
— | — | @@ -88,6 +92,7 @@ |
89 | 93 | ), |
90 | 94 | 'text' => null, |
91 | 95 | 'generatexml' => false, |
| 96 | + 'includecomments' => false, |
92 | 97 | ); |
93 | 98 | } |
94 | 99 | |
— | — | @@ -96,6 +101,7 @@ |
97 | 102 | 'text' => 'Wikitext to convert', |
98 | 103 | 'title' => 'Title of page', |
99 | 104 | 'generatexml' => 'Generate XML parse tree', |
| 105 | + 'includecomments' => 'Whether to include HTML comments in the output', |
100 | 106 | ); |
101 | 107 | } |
102 | 108 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -371,6 +371,7 @@ |
372 | 372 | * Get a list of all subscribed hooks, and those subscribers |
373 | 373 | * (bug 28225) Allow hiding of user groups in list=allusers |
374 | 374 | * (bug 27185) API: Add Special:ComparePages |
| 375 | +* (bug 28265) allow outputting of comments for action=expandtemplates |
375 | 376 | |
376 | 377 | === Languages updated in 1.18 === |
377 | 378 | |