Skip to content

Commit 61fc85c

Browse files
authored
Merge pull request #951 from phpDocumentor/backport/1.x/pr-944
[1.x] Fix Tex template name
2 parents bb92a54 + 11844c4 commit 61fc85c

File tree

149 files changed

+4922
-4456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+4922
-4456
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<div class="tab-pane fade {%- if tab.active %} show active{% endif -%}" id="{{ tab.key }}-{{ tabsId }}" role="tabpanel" aria-labelledby="{{ tab.key }}-tab-{{ tabsId }}">
22
{{ renderNode(tab.value) }}
33
</div>
4+
{# force a new line at the end of the file #}

packages/guides-theme-bootstrap/resources/template/body/directive/tabs/tabs-button.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
{{ renderNode(tab.content) }}
77
</button>
88
</li>
9+
{# force a new line at the end of the file #}
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11

22
<ul class="level-{{ menuEntry.level }}">
3-
{% for entry in menuEntry.children -%}
4-
<li><a href="{{ renderLink(entry.url) }}"
5-
class="nav-link {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}"
6-
{%- if menu.currentPath == entry.url %} aria-current="page" {%- endif -%} >
7-
{{ renderNode(entry.value.value) }}
8-
</a>
3+
{% for entry in menuEntry.children -%}
4+
<li>
5+
<a href="{{ renderLink(entry.url) }}"
6+
class="nav-link {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}"
7+
{%- if menu.currentPath == entry.url %} aria-current="page" {%- endif -%}>
8+
{{- renderNode(entry.value.value) -}}
9+
</a>
910

10-
{%- if entry.children|length %}
11-
{% include "body/menu/mainmenu/menu-level.html.twig" with {
12-
menuEntry:entry
13-
} %}
14-
{%- endif -%}
15-
</li>
16-
{% endfor %}
11+
{%- if entry.children|length %}
12+
{% include "body/menu/mainmenu/menu-level.html.twig" with {
13+
menuEntry:entry
14+
} %}
15+
{%- endif ~%}
16+
</li>
17+
{% endfor %}
1718
</ul>
19+
{# force a new line at the end of the file #}
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<nav class="nav flex-column">
2-
{% if node.caption %}
3-
<h2>{{ renderNode(node.caption) }}</h2>
4-
{% endif %}
5-
<ul class="menu-level-main">
6-
{% for entry in node.menuEntries -%}
7-
<li><a href="{{ renderLink(entry.url) }}"
8-
class="nav-link {%- if node.currentPath == entry.url %} current {%- endif -%}{% if entry.url in node.rootlinePaths %} active {%- endif -%}"
9-
{%- if node.currentPath == entry.url %} aria-current="page" {% endif -%} >
10-
{{ renderNode(entry.value.value) }}
11-
</a>
2+
{% if node.caption %}
3+
<h2>{{ renderNode(node.caption) }}</h2>
4+
{% endif %}
5+
<ul class="menu-level-main">
6+
{% for entry in node.menuEntries -%}
7+
<li>
8+
<a href="{{ renderLink(entry.url) }}"
9+
class="nav-link {%- if node.currentPath == entry.url %} current {%- endif -%}{% if entry.url in node.rootlinePaths %} active {%- endif -%}"
10+
{%- if node.currentPath == entry.url %} aria-current="page"{% endif -%}>
11+
{{- renderNode(entry.value.value) -}}
12+
</a>
1213

13-
{%- if entry.children|length %}
14-
{% include "body/menu/mainmenu/menu-level.html.twig" with {
15-
menu:node,
16-
menuEntry:entry
17-
} %}
18-
{%- endif -%}
14+
{%- if entry.children|length %}
15+
{% include "body/menu/mainmenu/menu-level.html.twig" with {
16+
menu:node,
17+
menuEntry:entry
18+
} %}
19+
{%- endif ~%}
1920
</li>
20-
{% endfor %}
21-
</ul>
22-
21+
{% endfor %}
22+
</ul>
2323
</nav>
24+
{# force a new line at the end of the file #}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
12
<ul class="level-{{ node.level }}">
23
{% for entry in node.menuEntries -%}
3-
{% apply spaceless %}
4-
<li class="nav-item">
5-
<a href="{{ renderLink(entry.url) }}"
6-
class="nav-link {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}"
7-
{%- if menu.currentPath == entry.url %} aria-current="page" {% endif %} >
8-
{{ renderNode(entry.value.value) }}
9-
</a>
10-
</li>
11-
{% endapply %}
12-
{%- endfor %}
4+
<li class="nav-item">
5+
<a href="{{ renderLink(entry.url) }}"
6+
class="nav-link {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}"
7+
{%- if menu.currentPath == entry.url %} aria-current="page"{% endif %}>
8+
{{- renderNode(entry.value.value) -}}
9+
</a>
10+
</li>
11+
{%~ endfor %}
1312
</ul>
13+
{# force a new line at the end of the file #}

packages/guides-theme-bootstrap/resources/template/body/menu/navbar/table-of-content.html.twig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
33
{% for entry in node.menuEntries -%}
44
<li class="nav-item">
5-
<a href="{{ renderLink(entry.url) }}" class="nav-link {%- if node.currentPath == entry.url %} current {%- endif -%}{% if entry.url in node.rootlinePaths %} active {%- endif -%}"
6-
{%- if node.currentPath == entry.url %} aria-current="page" {% endif %} >
7-
{{ renderNode(entry.value.value) }}
8-
</a>
5+
<a href="{{ renderLink(entry.url) }}" class="nav-link {%- if node.currentPath == entry.url %} current {%- endif -%}{% if entry.url in node.rootlinePaths %} active {%- endif -%}"
6+
{%- if node.currentPath == entry.url %} aria-current="page"{% endif %}>
7+
{{ renderNode(entry.value.value) }}
8+
</a>
99
</li>
1010

1111
{%- if entry.children|length %}
@@ -16,3 +16,4 @@
1616
{%- endif -%}
1717
{% endfor %}
1818
</ul>
19+
{# force a new line at the end of the file #}

packages/guides-theme-bootstrap/resources/template/structure/navigation/navbar.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<span class="navbar-toggler-icon"></span>
88
</button>
99
<div class="collapse navbar-collapse" id="navbarSupportedContent">
10-
1110
{% if parts.navbar %}
1211
{% for child in parts.navbar -%}
1312
{{ renderNode(child) }}
@@ -18,3 +17,4 @@
1817
</div>
1918
</div>
2019
</nav>
20+
{# force a new line at the end of the file #}

packages/guides/resources/config/guides.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
use phpDocumentor\Guides\Twig\EnvironmentBuilder;
5858
use phpDocumentor\Guides\Twig\GlobalMenuExtension;
5959
use phpDocumentor\Guides\Twig\Theme\ThemeManager;
60+
use phpDocumentor\Guides\Twig\TrimFilesystemLoader;
6061
use phpDocumentor\Guides\Twig\TwigTemplateRenderer;
6162
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6263
use Symfony\Component\DependencyInjection\Reference;
@@ -223,11 +224,12 @@
223224
param('phpdoc.guides.base_template_paths'),
224225
)
225226

226-
->set(FilesystemLoader::class)
227+
->set(TrimFilesystemLoader::class)
227228
->arg(
228229
'$paths',
229230
param('phpdoc.guides.base_template_paths'),
230231
)
232+
->alias(FilesystemLoader::class, TrimFilesystemLoader::class)
231233

232234
->set(LoadSettingsFromComposer::class)
233235
->tag('event_listener', ['event' => PostProjectNodeCreated::class])

packages/guides/resources/template/html/body/admonition.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
<div class="admonition {{ name }}{{ class ? (' '~class) }}{% if node.classes %} {{ node.classesString }}{% endif %}">
23
{% if title and isTitled %}<p class="admonition-title">{{ renderNode(title) }}</p>{% endif %}
34
{% if title and not isTitled %}<p>{{ renderNode(title) }}</p>{% endif %}

packages/guides/resources/template/html/body/code.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
{%- if node.emphasizeLines %} data-emphasize-lines="{{ node.emphasizeLines }}"{% endif -%}>
1313
{%- include "body/code/highlighted-code.html.twig" -%}
1414
</code></pre>
15-
{%- endif -%}
15+
{%~ endif -%}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<div class="{{ class }}"{% if id is defined and id %} id="{{ id }}"{% endif %}>
22
{{ renderNode(node) }}
33
</div>
4+
{# force a new line at the end of the file #}

packages/guides/resources/template/html/body/definition-list.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{% if definitionListTerm.children %}
1717
{%- for definition in definitionListTerm.children -%}
1818
<dd>{{ renderNode(definition) }}</dd>
19-
{%- endfor -%}
19+
{%- endfor ~%}
2020
{% endif %}
2121
{% endfor %}
2222
</dl>

packages/guides/resources/template/html/body/list/list.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
{{ renderNode(child) }}
1010
{% endfor %}
1111
</{{ keyword }}>
12+
{# force a new line at the end of the file #}
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
<li class="toc-item {%- if node.isCurrent %} current{% endif -%} {%- if node.isInRootline %} active{% endif -%}"><a href="{{ url }}">{{ node.value.toString }}</a>
2-
{%- if node.children|length %}
1+
<li class="toc-item {%- if node.isCurrent %} current{% endif -%} {%- if node.isInRootline %} active{% endif -%}">
2+
<a href="{{ url }}">{{ node.value.toString }}</a>
3+
{%~ if node.children|length %}
34
<ul class="menu-level-{{ node.level }}">
45
{% for child in node.children -%}
56
{{ renderNode(child) }}
67
{% endfor %}
78
</ul>
8-
{%- endif -%}
9-
{%- if node.sections|length %}
9+
{%- endif ~%}
10+
{%~ if node.sections|length %}
1011
<ul class="section-level-{{ node.level }}">
1112
{% for subsection in node.sections -%}
1213
{{ renderNode(subsection) }}
1314
{% endfor %}
1415
</ul>
15-
{%- endif -%}
16+
{%- endif ~%}
1617
</li>

packages/guides/resources/template/html/body/menu/menu-level.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
{{ renderNode(entry) }}
44
{% endfor %}
55
</ul>
6+
{# force a new line at the end of the file #}
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
{% apply spaceless %}
2-
{% set text = renderNode(node.value) %}
1+
{% set text = renderNode(node.value) %}
32

4-
{% if text %}
5-
<p{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{ text|raw }}</p>
6-
{% endif %}
7-
{% endapply %}
3+
{% if text %}
4+
<p{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{ text|raw }}</p>
5+
{% endif %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<blockquote{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{ renderNode(node.value) }}</blockquote>
1+
<blockquote{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{- renderNode(node.value) -}}</blockquote>

packages/guides/resources/template/html/body/table/table-body.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
{% include "body/table/table-row.html.twig" %}
44
{% endfor %}
55
</tbody>
6+
{# force a new line at the end of the file #}

packages/guides/resources/template/html/body/table/table-cell.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
{%- for child in column.children -%}
33
{{- renderNode(child) -}}
44
{%- else %}&nbsp;{% endfor %}</td>
5+
{# force a new line at the end of the file #}

packages/guides/resources/template/html/body/table/table-row.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
{% include "body/table/table-cell.html.twig" %}
44
{% endfor %}
55
</tr>
6+
{# force a new line at the end of the file #}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<a id="{{- node.value -}}"></a>
3-
{% endapply %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% apply spaceless %}{{ include('inline/link.html.twig') }}{% endapply %}
1+
{{- include('inline/link.html.twig') -}}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<em>{{- node.value -}}</em>
3-
{% endapply %}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
{% apply spaceless %}<img src="{{- node.url -}}" alt="{{- node.altText -}}"/>
2-
{% endapply %}
1+
<img src="{{- node.url -}}" alt="{{- node.altText -}}"/>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<code>{{- node.value -}}</code>
3-
{% endapply %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% apply spaceless %}&nbsp;{% endapply %}
1+
&nbsp;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% apply spaceless %}<br>{% endapply %}
1+
<br>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% apply spaceless %}{{ include('inline/link.html.twig') }}{% endapply %}
1+
{{- include('inline/link.html.twig') -}}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
{% apply spaceless %}<strong>{{- node.value -}}</strong>
2-
{% endapply %}
1+
<strong>{{- node.value -}}</strong>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<abbr title="{{ node.definition }}"{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.term }}</abbr>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<em class="aspect{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>
3-
{% endapply %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{%- apply spaceless %}<br/>{% endapply -%}
1+
<br/>
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
{% apply spaceless %}
21
<code{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</code>
3-
4-
{% endapply %}
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
{% apply spaceless %}
21
<strong class="command{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</strong>
3-
4-
{% endapply %}
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
{% apply spaceless %}
21
<em class="dfn{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>
3-
4-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<em{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</em>
3-
{% endapply %}
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
{% apply spaceless %}
21
<span class="pre file{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</span>
3-
4-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<span class="guilabel{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</span>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<kbd{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</kbd>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<code{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</code>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<em class="mailheader{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<math{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</math>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<span{%- if node.class %} class="{{ node.class }}"{% endif %}>{{- node.value -}}</span>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<strong{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</strong>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<sub{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sub>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<sub{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sub>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<sup{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sup>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<sup{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sup>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>
3-
{% endapply %}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{% apply spaceless %}
21
<code class="{{ node.type }}{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</code>
3-
{% endapply %}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
{% apply spaceless %}{{ renderNode(node.child) }}
2-
{% endapply %}
1+
{{- renderNode(node.child) -}}
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{% apply spaceless %}
2-
{% set text = renderNode(node.value) %}
1+
{%- set text = renderNode(node.value) -%}
32

4-
{% if text|trim %}
5-
{{ text|raw }}
6-
7-
{% endif %}
8-
{% endapply %}
3+
{%- if text|trim %}
4+
{{- text|raw -}}
5+
{% endif -%}

0 commit comments

Comments
 (0)