Skip to content

Commit

Permalink
Merge pull request #263 from takahirom/takahirom/fix-empty-report-by-…
Browse files Browse the repository at this point in the history
…adding-active-class-to-html-report/2024-02-18

Add class="active" for anchor tag in HTML report
  • Loading branch information
takahirom authored Feb 18, 2024
2 parents 4a90856 + 6471149 commit 84e0506
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ data class CaptureResults(
"<div class=\"col s12\">\n" +
"<ul class=\"tabs\">"
)
tabs.forEach { tab ->
tabs.forEachIndexed { tabIndex, tab ->
// <li class="tab col s3"><a href="#test1">Test 1</a></li>
append("""<li class="tab col s3"><a href="#${tab.id}">${tab.title}</a></li>""")
val activeClass = if (tabIndex == 0) """class="active" """ else ""
append("""<li class="tab col s3"><a $activeClass href="#${tab.id}">${tab.title}</a></li>""")
}
append("</ul>\n</div>")
tabs.forEach { tab ->
Expand Down

0 comments on commit 84e0506

Please sign in to comment.