Add markdown support

This commit is contained in:
hippoz 2021-07-20 02:14:20 +03:00
parent 50fc355a0f
commit d0e3ca7e21
No known key found for this signature in database
GPG key ID: 7C52899193467641
2 changed files with 6 additions and 4 deletions

View file

@ -1,3 +1,5 @@
page.Commit{
"yeah"
"<span foreground='blue' size='x-large'>Blue text</span> is <i>cool</i>!",
"\n",
"so true"
}

2
ui.c
View file

@ -34,7 +34,7 @@ void page_application_show(struct application_state* state) {
void page_application_text_buffer_append_text(struct application_state* state, const char* display_text) {
GtkTextIter iter;
gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(state->pageview_buffer), &iter);
gtk_text_buffer_insert(GTK_TEXT_BUFFER(state->pageview_buffer), &iter, display_text, -1);
gtk_text_buffer_insert_markup(GTK_TEXT_BUFFER(state->pageview_buffer), &iter, display_text, -1);
}
void page_application_text_buffer_set_text(struct application_state* state, const char* text) {