Skip to content

Commit

Permalink
Fixed regexps in APIDoc template
Browse files Browse the repository at this point in the history
  • Loading branch information
maryo committed Aug 17, 2018
1 parent 96924b9 commit a369488
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Resources/views/SwaggerUi/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,9 @@
{% endblock %}
{% endset %}

{{ html|replace({
'<link rel="stylesheet" href="/bundles/nelmioapidoc/style.css">': styles,
'<script src="/bundles/nelmioapidoc/init-swagger-ui.js"></script>': scripts,
})|regexp_replace({
{{ html|regexp_replace({
'~<link rel="stylesheet" href="[^"]*/bundles/nelmioapidoc/style.css">~': styles,
'~<script src="[^"]*/bundles/nelmioapidoc/init-swagger-ui.js"></script>~': scripts,
'~<script id="swagger-data".*?</script>~s': '',
'~<header>.*?</header>~s': header,
'~<div class="swagger-ui-wrap".*?</div>~s': footer,
Expand Down

0 comments on commit a369488

Please sign in to comment.