v3.0.0: added support for using '**' to highlight, like in markdown

This commit is contained in:
Evan Debenham
2024-11-21 14:03:29 -05:00
parent f93a588781
commit 67a4902d2c
4 changed files with 19 additions and 17 deletions
@@ -116,8 +116,10 @@ public class RenderedTextBlock extends Component {
words = new ArrayList<>();
boolean highlighting = false;
for (String str : tokens){
if (str.equals("_") && highlightingEnabled){
//if highlighting is enabled, '_' or '**' is used to toggle highlighting on or off
// the actual symbols are not rendered
if ((str.equals("_") || str.equals("**")) && highlightingEnabled){
highlighting = !highlighting;
} else if (str.equals("\n")){
words.add(NEWLINE);