Class: NotionToMd::TextAnnotation
- Inherits:
-
Object
- Object
- NotionToMd::TextAnnotation
- Defined in:
- lib/notion_to_md/text_annotation.rb
Overview
Append the text type:
-
italic: boolean,
-
bold: boolean,
-
striketrough: boolean,
-
underline: boolean,
-
code: boolean,
-
color: string NOT_SUPPORTED
Class Method Summary collapse
- .bold(text) ⇒ Object
- .code(text) ⇒ Object
- .color(text) ⇒ Object
- .italic(text) ⇒ Object
- .strikethrough(text) ⇒ Object
- .underline(text) ⇒ Object
Class Method Details
.bold(text) ⇒ Object
19 20 21 |
# File 'lib/notion_to_md/text_annotation.rb', line 19 def bold(text) "**#{text}**" end |
.code(text) ⇒ Object
31 32 33 |
# File 'lib/notion_to_md/text_annotation.rb', line 31 def code(text) "`#{text}`" end |
.color(text) ⇒ Object
35 36 37 |
# File 'lib/notion_to_md/text_annotation.rb', line 35 def color(text) text end |
.italic(text) ⇒ Object
15 16 17 |
# File 'lib/notion_to_md/text_annotation.rb', line 15 def italic(text) "*#{text}*" end |
.strikethrough(text) ⇒ Object
23 24 25 |
# File 'lib/notion_to_md/text_annotation.rb', line 23 def strikethrough(text) "~~#{text}~~" end |
.underline(text) ⇒ Object
27 28 29 |
# File 'lib/notion_to_md/text_annotation.rb', line 27 def underline(text) "<u>#{text}</u>" end |