Skip to content

Commit d620473

Browse files
committed
Don't print CSS class for <li> if none has been provided
1 parent 5270978 commit d620473

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Diff for: src/it/sidebar/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ assert html.contains( '<li class="active"><a><span class="none"></span>About</a>
2828
assert html.contains( '<li><a href="summary.html" title="Summary"><span class="none"></span>Summary</a>' )
2929
assert html.contains( '<li><a href="plugins.html" title="Plugins"><span class="none"></span>Plugins</a></li>' )
3030
// breadcrumb
31-
assert html.contains( '<li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>' )
31+
assert html.contains( '<li><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>' )

Diff for: src/it/topbar/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ assert html.contains( '<li><a title="About">About</a></li>' )
2828
assert html.contains( '<li><a href="summary.html" title="Summary">Summary</a></li>' )
2929
assert html.contains( '<li><a href="plugins.html" title="Plugins">Plugins</a></li>' )
3030
// breadcrumb
31-
assert html.contains( '<li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>' )
31+
assert html.contains( '<li><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>' )

Diff for: src/main/resources/META-INF/maven/site-macros.vm

+4
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@
224224
#* *##set ( $currentItemHref = './' )
225225
#* *##end
226226
##
227+
#* *##if( !$cssClass.isEmpty() )
227228
<li class="$cssClass">##
229+
#* *##else
230+
<li>##
231+
#end
228232
#* *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false )
229233
#* *#<span class="divider">$breadcrumbDivider</span>##
230234
#* *#</li>

0 commit comments

Comments
 (0)