mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-21 12:20:39 +00:00
fix: remove table formatting from github gists (#416)
* fix: fix CSS issue with gist embeds * Addressing PR comments * remove newline * simplify selector and add example * fix spellcheck * fix markdownlint Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
This commit is contained in:
parent
f1457b86fa
commit
61ef82104e
@ -32,3 +32,5 @@ UI
|
||||
webpack
|
||||
pre-processor[s]?
|
||||
propertylist
|
||||
gists
|
||||
spf13
|
||||
|
@ -83,13 +83,25 @@ echo "Hello World"
|
||||
|
||||
**Example:**
|
||||
|
||||
<!-- markdownlint-disable -->
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-capture -->
|
||||
<!-- markdownlint-disable -->
|
||||
{{< highlight Shell "linenos=table" >}}
|
||||
# some code
|
||||
echo "Hello World"
|
||||
{{< /highlight >}}
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end-->
|
||||
|
||||
<!-- markdownlint-enable -->
|
||||
## Gist Shortcode
|
||||
|
||||
The Gist shortcode is a built-in Hugo shortcode to load GitHub gists. For details usage information please check the Hugo [documentation](https://gohugo.io/content-management/shortcodes/#gist).
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```markdown
|
||||
{{</* gist spf13 7896402 */>}}
|
||||
```
|
||||
|
||||
**Example:**
|
||||
|
||||
{{< gist spf13 7896402 >}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{ $content := .Content }}
|
||||
|
||||
{{ $content = $content | replaceRE `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML }}
|
||||
{{ $content = $content | replaceRE `(<table>(?:.|\n)+?</table>)` `<div class=table-wrap> ${1} </div>` | safeHTML }}
|
||||
{{ $content = $content | replaceRE `(<table>(?:.|\n)+?</table>)` `<div class="table-wrap"> ${1} </div>` | safeHTML }}
|
||||
|
||||
{{ return $content }}
|
||||
|
@ -131,7 +131,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
table:not(.lntable) {
|
||||
table:not(.lntable):not(.highlight) {
|
||||
display: table;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
|
Loading…
Reference in New Issue
Block a user