mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-08-31 06:06:41 -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{
|
||||
Indent: indent + margin,
|
||||
IndentFunc: func(wr io.Writer) {
|
||||
renderText(w, ctx.blockStack.Parent().Style, " ")
|
||||
renderText(w, ctx.blockStack.Current().Style, " ")
|
||||
},
|
||||
Forward: &AnsiWriter{
|
||||
Forward: w,
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ func (e *HeadingElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
iw := &IndentWriter{
|
||||
Indent: indent + margin,
|
||||
IndentFunc: func(wr io.Writer) {
|
||||
renderText(w, bs.Parent().Style, " ")
|
||||
renderText(w, bs.Current().Style, " ")
|
||||
},
|
||||
Forward: &AnsiWriter{
|
||||
Forward: w,
|
||||
|
||||
Reference in New Issue
Block a user