v3.0.0: added support for using '**' to highlight, like in markdown
This commit is contained in:
@@ -149,17 +149,17 @@ public class DesktopPlatformSupport extends PlatformSupport {
|
||||
}
|
||||
}
|
||||
|
||||
//splits on newlines, underscores, and chinese/japaneses characters
|
||||
//splits on newline (for layout), chinese/japanese (for font choice), and '_'/'**' (for highlighting)
|
||||
private Pattern regularsplitter = Pattern.compile(
|
||||
"(?<=\n)|(?=\n)|(?<=_)|(?=_)|" +
|
||||
"(?<=\n)|(?=\n)|(?<=_)|(?=_)|(?<=\\*\\*)|(?=\\*\\*)|" +
|
||||
"(?<=\\p{InHiragana})|(?=\\p{InHiragana})|" +
|
||||
"(?<=\\p{InKatakana})|(?=\\p{InKatakana})|" +
|
||||
"(?<=\\p{InCJK_Unified_Ideographs})|(?=\\p{InCJK_Unified_Ideographs})|" +
|
||||
"(?<=\\p{InCJK_Symbols_and_Punctuation})|(?=\\p{InCJK_Symbols_and_Punctuation})");
|
||||
|
||||
//additionally splits on words, so that each word can be arranged individually
|
||||
//additionally splits on spaces, so that each word can be laid out individually
|
||||
private Pattern regularsplitterMultiline = Pattern.compile(
|
||||
"(?<= )|(?= )|(?<=\n)|(?=\n)|(?<=_)|(?=_)|" +
|
||||
"(?<= )|(?= )|(?<=\n)|(?=\n)|(?<=_)|(?=_)|(?<=\\*\\*)|(?=\\*\\*)|" +
|
||||
"(?<=\\p{InHiragana})|(?=\\p{InHiragana})|" +
|
||||
"(?<=\\p{InKatakana})|(?=\\p{InKatakana})|" +
|
||||
"(?<=\\p{InCJK_Unified_Ideographs})|(?=\\p{InCJK_Unified_Ideographs})|" +
|
||||
|
||||
Reference in New Issue
Block a user