mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Add markdown transformation in HTML output, fix Markdown formatter
This commit is contained in:
parent
a0a9170d1c
commit
3ec87522b2
@ -27,13 +27,8 @@ class MarkdownFormatter extends AbstractFormatter
|
||||
$markdown .= "\n\n";
|
||||
|
||||
if (isset($data['documentation']) && !empty($data['documentation'])) {
|
||||
$markdown .= "#### Documentation ####\n\n";
|
||||
|
||||
foreach (explode("\n", $data['documentation']) as $line) {
|
||||
$markdown .= " " . $line . "\n";
|
||||
}
|
||||
|
||||
$markdown .= "\n";
|
||||
$markdown .= $data['documentation'];
|
||||
$markdown .= "\n\n";
|
||||
}
|
||||
|
||||
if (isset($data['requirements']) && !empty($data['requirements'])) {
|
||||
|
@ -25,7 +25,7 @@
|
||||
<div class="pane content selected">
|
||||
{% if data.documentation is defined and data.documentation is not empty %}
|
||||
<h4>Documentation</h4>
|
||||
<pre>{{ data.documentation }}</pre>
|
||||
<p>{{ data.documentation|markdown }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if data.requirements is defined and data.requirements is not empty %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user