mirror of
https://github.com/TakeV-Lambda/dino.git
synced 2024-11-21 22:44:23 +00:00
Format quotes as preformatted text (#1111)
This commit is contained in:
parent
9490ffed6b
commit
795af2d9ce
1 changed files with 13 additions and 0 deletions
|
@ -341,6 +341,19 @@ public static string parse_add_markup(string s_, string? highlight_word, bool pa
|
|||
assert_not_reached();
|
||||
}
|
||||
}
|
||||
|
||||
Regex regex = new Regex("((?<=\n)>.*(\n|$))|(^>.*(\n|$))");
|
||||
MatchInfo match_info;
|
||||
regex.match(s.down(), 0, out match_info);
|
||||
|
||||
if (match_info.matches()) {
|
||||
int start, end;
|
||||
|
||||
match_info.fetch_pos(0, out start, out end);
|
||||
return parse_add_markup(s[0:start], highlight_word, parse_links, parse_text_markup, already_escaped) +
|
||||
"<span fgalpha='70%'>" + s[start:end] + "</span>" +
|
||||
parse_add_markup(s[end:s.length], highlight_word, parse_links, parse_text_markup, already_escaped);
|
||||
}
|
||||
}
|
||||
|
||||
return s;
|
||||
|
|
Loading…
Reference in a new issue