mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
fix: do not replace comments with empty lines
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
committed by
Christian Muehlhaeuser
parent
1e311cd4e1
commit
d5fb104a74
+1
-1
@@ -332,7 +332,7 @@ func (tr *ANSIRenderer) NewElement(node ast.Node, source []byte) Element {
|
|||||||
n := node.(*ast.HTMLBlock)
|
n := node.(*ast.HTMLBlock)
|
||||||
return Element{
|
return Element{
|
||||||
Renderer: &BaseElement{
|
Renderer: &BaseElement{
|
||||||
Token: ctx.SanitizeHTML(string(n.Text(source)), true) + "\n",
|
Token: ctx.SanitizeHTML(string(n.Text(source)), true),
|
||||||
Style: ctx.options.Styles.HTMLBlock.StylePrimitive,
|
Style: ctx.options.Styles.HTMLBlock.StylePrimitive,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+11
@@ -23,6 +23,8 @@ Check out the [Gold Style Gallery](https://github.com/charmbracelet/gold/blob/ma
|
|||||||
|
|
||||||
Currently `gold` uses the [Aurora ANSI colors](https://godoc.org/github.com/logrusorgru/aurora#Index).
|
Currently `gold` uses the [Aurora ANSI colors](https://godoc.org/github.com/logrusorgru/aurora#Index).
|
||||||
|
|
||||||
|
<!-- comments should be ignored -->
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
Style definitions located in `styles/` can be embedded into the binary by
|
Style definitions located in `styles/` can be embedded into the binary by
|
||||||
@@ -32,5 +34,14 @@ running [statik](https://github.com/rakyll/statik):
|
|||||||
statik -f -src styles -include "*.json"
|
statik -f -src styles -include "*.json"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<!--
|
||||||
|
multiline comments should also be ignored
|
||||||
|
this is one comment with
|
||||||
|
more than one
|
||||||
|
line
|
||||||
|
|
||||||
|
yup
|
||||||
|
-->
|
||||||
|
|
||||||
You can re-generate screenshots of all available styles by running `gallery.sh`.
|
You can re-generate screenshots of all available styles by running `gallery.sh`.
|
||||||
This requires `termshot` and `pngcrush` installed on your system!
|
This requires `termshot` and `pngcrush` installed on your system!
|
||||||
|
|||||||
Reference in New Issue
Block a user