mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 08:35:28 +00:00
define shared ESC const, add filter for title
This commit is contained in:
parent
e4c62ca3b3
commit
9a3cb77fe7
1 changed files with 4 additions and 2 deletions
|
|
@ -77,7 +77,7 @@ impl Tags {
|
|||
// Cleanup unformatted escape chars
|
||||
let mut cursor = buffer.start_iter();
|
||||
while let Some((mut match_start, mut match_end)) =
|
||||
cursor.forward_search("\\", TextSearchFlags::CASE_INSENSITIVE, None)
|
||||
cursor.forward_search(ESC, TextSearchFlags::CASE_INSENSITIVE, None)
|
||||
{
|
||||
buffer.delete(&mut match_start, &mut match_end);
|
||||
cursor = match_end;
|
||||
|
|
@ -93,7 +93,9 @@ impl Tags {
|
|||
s = reference::strip_tags(&s);
|
||||
s = strike::strip_tags(&s);
|
||||
s = underline::strip_tags(&s);
|
||||
s // @TODO other tags
|
||||
s.replace(ESC, "")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const ESC: &str = "\\";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue