From 28d5fc41aa0e39e98ac4eb06d7534e104ef0d325 Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Sat, 5 Aug 2017 19:45:23 -0500 Subject: [PATCH] Modified edit fragment padding and added fenced code plugin for AndDown/HoeDown --- .../main/java/com/wbrawner/simplemarkdown/PreviewFragment.java | 3 ++- app/src/main/res/layout/fragment_edit.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/PreviewFragment.java b/app/src/main/java/com/wbrawner/simplemarkdown/PreviewFragment.java index dd5aacd..0c4cf29 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/PreviewFragment.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/PreviewFragment.java @@ -103,7 +103,8 @@ public class PreviewFragment extends Fragment { AndDown andDown = new AndDown(); int hoedownFlags = AndDown.HOEDOWN_EXT_STRIKETHROUGH | AndDown.HOEDOWN_EXT_TABLES | - AndDown.HOEDOWN_EXT_UNDERLINE | AndDown.HOEDOWN_EXT_SUPERSCRIPT; + AndDown.HOEDOWN_EXT_UNDERLINE | AndDown.HOEDOWN_EXT_SUPERSCRIPT | + AndDown.HOEDOWN_EXT_FENCED_CODE; String html = andDown.markdownToHtml(text, hoedownFlags, 0); mMarkdownView.loadDataWithBaseURL(null, html, "text/html", "UTF-8", null); mMarkdownView.scrollTo(0, scrollY); diff --git a/app/src/main/res/layout/fragment_edit.xml b/app/src/main/res/layout/fragment_edit.xml index b86f87f..6b97ca6 100644 --- a/app/src/main/res/layout/fragment_edit.xml +++ b/app/src/main/res/layout/fragment_edit.xml @@ -11,7 +11,8 @@ android:background="@null" android:imeOptions="flagNoExtractUi" android:gravity="top" - android:padding="8dp" + android:paddingLeft="8dp" + android:paddingRight="8dp" android:hint="@string/markdown_here" android:scrollHorizontally="false" />