diff --git a/src/app/browser/main/tab/page/content/text/gemini/reader.cpp b/src/app/browser/main/tab/page/content/text/gemini/reader.cpp index 05881f94..1be901ef 100644 --- a/src/app/browser/main/tab/page/content/text/gemini/reader.cpp +++ b/src/app/browser/main/tab/page/content/text/gemini/reader.cpp @@ -161,7 +161,7 @@ Glib::ustring Reader::make( continue; } - // Header + // Quote Glib::ustring quote; if (Line::Match::quote(line, quote)) @@ -177,10 +177,11 @@ Glib::ustring Reader::make( // @TODO other tags.. + // Default pango.append( - line.append( - "\n" - ) // @TODO + Make::plain( + line + ) ); } @@ -261,6 +262,17 @@ Glib::ustring Reader::Make::link( ); } +Glib::ustring Reader::Make::plain( + const Glib::ustring & TEXT +) { + return Glib::ustring::sprintf( + "%s\n", + Glib::Markup::escape_text( + TEXT + ) + ); +} + Glib::ustring Reader::Make::quote( const Glib::ustring & TEXT ) { diff --git a/src/app/browser/main/tab/page/content/text/gemini/reader.hpp b/src/app/browser/main/tab/page/content/text/gemini/reader.hpp index feaf543e..0d0b2d38 100644 --- a/src/app/browser/main/tab/page/content/text/gemini/reader.hpp +++ b/src/app/browser/main/tab/page/content/text/gemini/reader.hpp @@ -52,6 +52,10 @@ namespace app::browser::main::tab::page::content::text::gemini const Glib::ustring & ALT ); + static Glib::ustring plain( + const Glib::ustring & TEXT + ); + static Glib::ustring quote( const Glib::ustring & TEXT );