Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabbed pane, fix: do not print blank first line #1416

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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