Skip to content

Commit

Permalink
wip: show colour for inline code
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed Nov 1, 2023
1 parent 81ea6bd commit 893843d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ansi/blockelement.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (e *BlockElement) Render(w io.Writer, ctx RenderContext) error {
func (e *BlockElement) Finish(w io.Writer, ctx RenderContext) error {
bs := ctx.blockStack
blockBuffer := bs.Current().Block
ls := e.Style.Style().Width(ctx.options.WordWrap)
ls := e.Style.Style().Inherit(e.Style.StylePrimitive.Style()).Width(ctx.options.WordWrap)

_, err := w.Write([]byte(ls.Render(blockBuffer.String())))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion ansi/elements.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (tr *ANSIRenderer) NewElement(node ast.Node, source []byte) Element {
// n := node.(*ast.CodeSpan)
e := &BlockElement{
Block: &bytes.Buffer{},
Style: ctx.blockStack.Current().Style,
Style: ctx.options.Styles.Code,
}
return Element{
Renderer: e,
Expand Down

0 comments on commit 893843d

Please sign in to comment.