File tree Expand file tree Collapse file tree
userguide/content/en/docs/adding-content/shortcodes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525 pre {
2626 margin : 0 ;
27- padding : 0 1rem 1rem 1rem ;
2827 }
2928 }
3029}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ <h6 class="card-title ms-2 text-body-secondary">
3131 {{ end -}}
3232 {{ with $.Inner -}}
3333 {{ if $code -}}
34- {{ highlight . $lang $highlight -}}
34+ {{ highlight ( . | strings.TrimSpace ) $lang $highlight -}}
3535 {{ else -}}
3636 < p class ="card-text ">
3737 {{ . -}}
Original file line number Diff line number Diff line change @@ -669,10 +669,18 @@ int main(void)
669669
670670This code translates to the card shown below:
671671
672- {{< card code=true header="** C** " lang="C" highlight="" >}} #include <stdio.h>
672+ <!-- prettier-ignore-start -->
673+ {{< card code=true header="** C** " lang="C" highlight="" >}}
674+ #include <stdio.h>
673675#include <stdlib.h>
674676
675- int main(void) { puts("Hello World!"); return EXIT_SUCCESS; } {{< /card >}}
677+ int main(void)
678+ {
679+ puts("Hello World!");
680+ return EXIT_SUCCESS;
681+ }
682+ {{< /card >}}
683+ <!-- prettier-ignore-end -->
676684
677685<br />If called with parameter ` code=true ` , the ` card ` shortcode can optionally
678686hold the named parameters ` lang ` and/or ` highlight ` . The values of these
You can’t perform that action at this time.
0 commit comments