Implement styles
All checks were successful
CI Pipeline / build (pull_request) Successful in 12s

This commit is contained in:
2025-12-02 12:02:51 +01:00
parent 1fffecf0eb
commit 58492e9ef6
16 changed files with 786 additions and 23 deletions

View File

@@ -3,11 +3,12 @@
module Ezdoc
module Nodes
class Paragraph < Base
attr_reader :runs
attr_reader :runs, :style
def initialize(runs = [])
def initialize(runs = [], style: nil)
super()
@runs = runs
@style = style
end
def add_run(run)

View File

@@ -3,14 +3,15 @@
module Ezdoc
module Nodes
class Run < Base
attr_reader :text, :bold, :italic, :underline
attr_reader :text, :bold, :italic, :underline, :style
def initialize(text, bold: false, italic: false, underline: false)
def initialize(text, bold: false, italic: false, underline: false, style: nil)
super()
@text = text
@bold = bold
@italic = italic
@underline = underline
@style = style
end
end
end