From e9587f73ce623ecbd990435acfef6af50b6675c7 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 7 Nov 2017 23:28:14 +0100 Subject: [PATCH] styling: introduce support for code blocks --- .../conversations/utils/ImStyleParser.java | 46 +++++++++++++++---- .../conversations/utils/StylingHelper.java | 18 ++++---- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java b/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java index 1d164bf48..893b925fc 100644 --- a/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java +++ b/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java @@ -35,19 +35,29 @@ import java.util.List; public class ImStyleParser { - final static List KEYWORDS = Arrays.asList('*', '_', '~', '`'); - final static List NO_SUB_PARSING_KEYWORDS = Arrays.asList('`'); - final static boolean ALLOW_EMPTY = false; + private final static List KEYWORDS = Arrays.asList('*', '_', '~', '`'); + private final static List NO_SUB_PARSING_KEYWORDS = Arrays.asList('`'); + private final static List BLOCK_KEYWORDS = Arrays.asList('`'); + private final static boolean ALLOW_EMPTY = false; public static List