## e-markdown-utils

e-markdown-utils

## Functions

gchar * | e_markdown_utils_text_to_html ()
gchar * | e_markdown_utils_text_to_html_full ()
gchar * | e_markdown_utils_html_to_text ()
EMarkdownHTMLToTextFlags | e_markdown_utils_link_to_text_to_flags ()

## Description

## Functions

### e_markdown_utils_text_to_html ()

    gchar *
    e_markdown_utils_text_to_html (const gchar *plain_text,
                                   gssize length);

Convert `plain_text` , possibly with markdown, into the HTML.

Note: The function can return `NULL` when was not built with the markdown support.

#### Parameters

plain_text | plain text with markdown to convert to HTML |
length | length of the `plain_text` , or -1 when it's nul-terminated |

#### Returns

text converted into HTML, or `NULL`, when was not built with the markdown support. Free the string with `g_free()`, when no longer needed.

[transfer full][nullable]

Since: 3.44

### e_markdown_utils_text_to_html_full ()

    gchar *
    e_markdown_utils_text_to_html_full (const gchar *plain_text,
                                        gssize length,
                                        EMarkdownTextToHTMLFlags flags);

Convert `plain_text` , possibly with markdown, into the HTML, influencing the result HTML code with the `flags` .

Note: The function can return `NULL` when was not built with the markdown support.

#### Parameters

plain_text | plain text with markdown to convert to HTML |
length | length of the `plain_text` , or -1 when it's nul-terminated |
flags | a bit-or of `EMarkdownTextToHTMLFlags` flags |

#### Returns

text converted into HTML, or `NULL`, when was not built with the markdown support. Free the string with `g_free()`, when no longer needed.

[transfer full][nullable]

Since: 3.48

### e_markdown_utils_html_to_text ()

    gchar *
    e_markdown_utils_html_to_text (const gchar *html,
                                   gssize length,
                                   EMarkdownHTMLToTextFlags flags);

Convert `html` into the markdown text. The `flags` influence what can be preserved from the `html` .

#### Parameters

html | a text in HTML |
length | length of the `html` , or -1 when it's nul-terminated |
flags | a bit-or of `EMarkdownHTMLToTextFlags` |

#### Returns

HTML converted into markdown text. Free the string with `g_free()`, when no longer needed.

[transfer full][nullable]

Since: 3.44

### e_markdown_utils_link_to_text_to_flags ()

    EMarkdownHTMLToTextFlags
    e_markdown_utils_link_to_text_to_flags
                                   (EHTMLLinkToText link_to_text);

Converts `link_to_text` enum into corresponding EMarkdownHTMLToTextFlags flag.

#### Parameters

link_to_text | an EHTMLLinkToText |

#### Returns

`link_to_text` as #EMarkdownHTMLToTextFlags

Since: 3.52