mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 16:37:19 -04:00
Render indent of code_block and heading in current style
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ func (e *CodeBlockElement) Render(w io.Writer, ctx RenderContext) error {
|
|||||||
iw := &IndentWriter{
|
iw := &IndentWriter{
|
||||||
Indent: indent + margin,
|
Indent: indent + margin,
|
||||||
IndentFunc: func(wr io.Writer) {
|
IndentFunc: func(wr io.Writer) {
|
||||||
renderText(w, ctx.blockStack.Parent().Style, " ")
|
renderText(w, ctx.blockStack.Current().Style, " ")
|
||||||
},
|
},
|
||||||
Forward: &AnsiWriter{
|
Forward: &AnsiWriter{
|
||||||
Forward: w,
|
Forward: w,
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ func (e *HeadingElement) Render(w io.Writer, ctx RenderContext) error {
|
|||||||
iw := &IndentWriter{
|
iw := &IndentWriter{
|
||||||
Indent: indent + margin,
|
Indent: indent + margin,
|
||||||
IndentFunc: func(wr io.Writer) {
|
IndentFunc: func(wr io.Writer) {
|
||||||
renderText(w, bs.Parent().Style, " ")
|
renderText(w, bs.Current().Style, " ")
|
||||||
},
|
},
|
||||||
Forward: &AnsiWriter{
|
Forward: &AnsiWriter{
|
||||||
Forward: w,
|
Forward: w,
|
||||||
|
|||||||
Reference in New Issue
Block a user