v3.0.0: added support for using '**' to highlight, like in markdown
This commit is contained in:
+4
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user