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
17 18 19 |
# File 'lib/notion_to_md/text_annotation.rb', line 17 def bold(text) "**#{text}**" end |
.code(text) ⇒ Object
29 30 31 |
# File 'lib/notion_to_md/text_annotation.rb', line 29 def code(text) "`#{text}`" end |
.color(text) ⇒ Object
33 34 35 |
# File 'lib/notion_to_md/text_annotation.rb', line 33 def color(text) text end |
.italic(text) ⇒ Object
13 14 15 |
# File 'lib/notion_to_md/text_annotation.rb', line 13 def italic(text) "*#{text}*" end |
.strikethrough(text) ⇒ Object
21 22 23 |
# File 'lib/notion_to_md/text_annotation.rb', line 21 def strikethrough(text) "~~#{text}~~" end |
.underline(text) ⇒ Object
25 26 27 |
# File 'lib/notion_to_md/text_annotation.rb', line 25 def underline(text) "<u>#{text}</u>" end |