Fixed quote style

pull/194/merge
M66B 4 years ago
parent 8c923ca2ea
commit 75b86d8183

@ -2209,15 +2209,16 @@ public class HtmlHelper {
} }
static String getQuoteStyle(CharSequence quoted, int start, int end) { static String getQuoteStyle(CharSequence quoted, int start, int end) {
String dir = "left";
try { try {
int count = end - start; int count = end - start;
if (TextDirectionHeuristics.FIRSTSTRONG_LTR.isRtl(quoted, start, count)) if (TextDirectionHeuristics.FIRSTSTRONG_LTR.isRtl(quoted, start, count))
return "border-right:3px solid #ccc; padding-left:3px;"; dir = "right";
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(new Throwable("getQuoteStyle " + start + "..." + end, ex)); Log.e(new Throwable("getQuoteStyle " + start + "..." + end, ex));
} }
return "border-left:3px solid #ccc; padding-left:3px;"; return "border-" + dir + ":3px solid #ccc; padding-" + dir + ":3px;margin-top:0; margin-bottom:0;";
} }
static boolean hasBorder(Element e) { static boolean hasBorder(Element e) {

Loading…
Cancel
Save