Skip to content

Commit

Permalink
add background color and caption in code block
Browse files Browse the repository at this point in the history
Signed-off-by: ariary <[email protected]>
  • Loading branch information
ariary authored and jomei committed May 24, 2022
1 parent 39f75cb commit d746f76
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
1 change: 1 addition & 0 deletions block.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ func (i Image) GetURL() string {
}

type CodeBlock struct {
Caption []RichText `json:"caption,omitempty"`
BasicBlock
Code Code `json:"code"`
}
Expand Down
30 changes: 20 additions & 10 deletions const.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,26 @@ const (
)

const (
ColorDefault Color = "default"
ColorGray Color = "gray"
ColorBrown Color = "brown"
ColorOrange Color = "orange"
ColorYellow Color = "yellow"
ColorGreen Color = "green"
ColorBlue Color = "blue"
ColorPurple Color = "purple"
ColorPink Color = "pink"
ColorRed Color = "red"
ColorDefault Color = "default"
ColorGray Color = "gray"
ColorBrown Color = "brown"
ColorOrange Color = "orange"
ColorYellow Color = "yellow"
ColorGreen Color = "green"
ColorBlue Color = "blue"
ColorPurple Color = "purple"
ColorPink Color = "pink"
ColorRed Color = "red"
ColorDefaultBackground Color = "default_background"
ColorGrayBackground Color = "gray_background"
ColorBrownBackground Color = "brown_background"
ColorOrangeBackground Color = "orange_background"
ColorYellowBackground Color = "yellow_background"
ColorGreenBackground Color = "green_background"
ColorBlueBackground Color = "blue_background"
ColorPurpleBackground Color = "purple_background"
ColorPinkBackground Color = "pink_background"
ColorRedBackground Color = "red_background"
)

const (
Expand Down

0 comments on commit d746f76

Please sign in to comment.