Skip to content

Commit

Permalink
Merge branch 'unescape-backticks' of https://github.com/frozolotl/typ…
Browse files Browse the repository at this point in the history
…st-bot into unescape-backticks
  • Loading branch information
mattfbacon committed Jan 28, 2024
2 parents 6eb507e + 910be40 commit 7de2182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ impl<'a> poise::PopArgument<'a> for CodeBlock {
source = strip_ansi_escapes::strip_str(source);
}

// Remove all occurrences of the ZWJ when used if surrounded by backticks.
// Remove all occurrences of zero width joiners surrounded by backticks.
// This is used to enter Typst code blocks within Discord-markdown code blocks.
// Two replace calls are needed to remove all patterns of `ABA`: ABABABA => AABAA => AAAA.
let pattern = format!("`{ZERO_WIDTH_JOINER}`");
Expand Down

0 comments on commit 7de2182

Please sign in to comment.