Skip to content

Commit

Permalink
Tabbed pane, fix: do not print blank first line
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Feb 15, 2023
1 parent 57d3d42 commit 64024bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/shortcodes/tabpane.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
{{ if $text -}}
{{ index . "content" -}}
{{ else -}}
{{ highlight (trim (index . "content") "\n") $lang $hloptions -}}
{{ highlight (trim (index . "content") "\r\n") $lang $hloptions -}}
{{ end }}
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ in the response headers." you __CAN__ embed it, but when the test says "Great! X
Sometimes it's very useful to have tabbed panes when authoring content. One common use-case is to show multiple syntax highlighted code blocks that showcase the same problem, and how to solve it in different programming languages. As an example, the tabbed pane below shows the language-specific variants of the famous `Hello world!` program one usually writes first when learning a new programming language:

{{< tabpane langEqualsHeader=true >}}
{{< tab "C" >}}
{{< tab "C" >}}
#include <stdio.h>
#include <stdlib.h>

Expand Down

0 comments on commit 64024bd

Please sign in to comment.