You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by co...@apache.org on 2016/09/22 00:52:50 UTC

zeppelin git commit: [ZEPPELIN-1387] Support table syntax in markdown interpreter

Repository: zeppelin
Updated Branches:
  refs/heads/master eb01bddd9 -> 46cd56ad2


[ZEPPELIN-1387] Support table syntax in markdown interpreter

### What is this PR for?

Support table markdown syntax issued by [ZEPPELIN-1387](https://issues.apache.org/jira/browse/ZEPPELIN-1387?jql=project%20%3D%20ZEPPELIN)

### What type of PR is it?
[Bug Fix | Improvement]

This PR can be categorized as bug fix and improvement since it not only resolves the above issue but also support other markdown syntaxes.

### Todos
* [ ] - Check the license issue of the [pegdown](https://github.com/sirthias/pegdown) library introduced by this PR

### What is the Jira issue?

[ZEPPELIN-1387](https://issues.apache.org/jira/browse/ZEPPELIN-1387?jql=project%20%3D%20ZEPPELIN)

### How should this be tested?

Write markdown texts and compare them with expected html DOMs. I'v also included some tests for this PR.

### Screenshots (if appropriate)

<img width="708" alt="markdown" src="https://cloud.githubusercontent.com/assets/4968473/18061274/1f2be526-6e5d-11e6-9f1a-3528f3958d2c.png">

### Questions:

* Does the licenses files need update?
* Does coding style is appropriate?

### Additional Comments

We might solve this issue by implementing custom table plugin for markdown4j by referring [the existing work of txtmark](https://github.com/zhenchuan/txtmark/commit/178486805e78e3d572b071ca8b9f8887a066edef).
But I think it is not good idea in regard to coverage, maintainability and efficiency since markdown4j is currently not developed actively and it costs to implement all markdown plugins which is not supported by markdown4j.

Author: 1ambda <1a...@gmail.com>

Closes #1384 from 1ambda/fix-zeppelin-1387 and squashes the following commits:

16cda72 [1ambda] fix: Merge with 3c8158 to resolve CI failure
e6d41c8 [1ambda] fix: Resolve merge conflict with 8f344db
e08929a [1ambda] fix: Handle more specific exception in catch block
8b1e017 [1ambda] chore: Move github-markdown-css license to bin_licenses
4d1cb3c [1ambda] fix: Typo in docs/interpreter/markdown.md
85a5e3a [1ambda] fix: Use bower to install github-markdown-css
297733f [1ambda] fix: Modify github-markdown-css license
947a92a [1ambda] chore: Add license to newly created java files
d228423 [1ambda] docs: Update markdown docs config, examples
2b6516c [1ambda] feat: Support markdown.parser.type attr in md
d2d4455 [1ambda] style: Reformat using intellij-java-google-style
bf9100d [1ambda] chore: Restore markdown4j dependency
55a2f10 [1ambda] fix: Add MarkdownParser interface to support mulitple parsers
c33c715 [1ambda] fix: Remove the ANCHORLINKS option
9cf31d0 [1ambda] fix: Use markdown-body class (default)
f741949 [1ambda] fix: Add styles for markdown
603d3db [1ambda] fix: Add missing transitive deps for pegdown
7aecdcb [1ambda] chore: Add pegdown to the binary license list
fa14b3e [1ambda] style: Apply google java code style guide
029f550 [1ambda] [ZEPPELIN-1387] Support table in markdown interpreter


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/46cd56ad
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/46cd56ad
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/46cd56ad

Branch: refs/heads/master
Commit: 46cd56ad26d59e93d3875c78f29fc6ebd27dfc07
Parents: eb01bdd
Author: 1ambda <1a...@gmail.com>
Authored: Wed Sep 21 10:20:58 2016 +0900
Committer: Damien CORNEAU <co...@gmail.com>
Committed: Thu Sep 22 09:52:31 2016 +0900

----------------------------------------------------------------------
 .../markdown-example-markdown4j-parser.png      | Bin 0 -> 264309 bytes
 .../markdown-example-pegdown-parser.png         | Bin 0 -> 147514 bytes
 .../docs-img/markdown-interpreter-setting.png   | Bin 32571 -> 67890 bytes
 docs/interpreter/markdown.md                    |  32 +-
 markdown/pom.xml                                |  10 +-
 .../org/apache/zeppelin/markdown/Markdown.java  |  90 ------
 .../zeppelin/markdown/Markdown4jParser.java     |  47 +++
 .../zeppelin/markdown/MarkdownInterpreter.java  | 124 ++++++++
 .../zeppelin/markdown/MarkdownParser.java       |  23 ++
 .../apache/zeppelin/markdown/PegdownParser.java |  56 ++++
 .../src/main/resources/interpreter-setting.json |  11 +-
 .../zeppelin/markdown/Markdown4jParserTest.java |  51 ++++
 .../apache/zeppelin/markdown/MarkdownTest.java  |  48 ---
 .../zeppelin/markdown/PegdownParserTest.java    | 302 +++++++++++++++++++
 zeppelin-distribution/src/bin_license/LICENSE   |  11 +-
 .../licenses/LICENSE-github-markdown-css-2.4.0  |  21 ++
 zeppelin-web/bower.json                         |   3 +-
 zeppelin-web/src/index.html                     |   1 +
 18 files changed, 683 insertions(+), 147 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/docs/assets/themes/zeppelin/img/docs-img/markdown-example-markdown4j-parser.png
----------------------------------------------------------------------
diff --git a/docs/assets/themes/zeppelin/img/docs-img/markdown-example-markdown4j-parser.png b/docs/assets/themes/zeppelin/img/docs-img/markdown-example-markdown4j-parser.png
new file mode 100644
index 0000000..e3455e3
Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/markdown-example-markdown4j-parser.png differ

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/docs/assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png
----------------------------------------------------------------------
diff --git a/docs/assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png b/docs/assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png
new file mode 100644
index 0000000..21e8bc5
Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png differ

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/docs/assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png
----------------------------------------------------------------------
diff --git a/docs/assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png b/docs/assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png
index 7b294e1..33c13ec 100644
Binary files a/docs/assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png and b/docs/assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png differ

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/docs/interpreter/markdown.md
----------------------------------------------------------------------
diff --git a/docs/interpreter/markdown.md b/docs/interpreter/markdown.md
index 5aeb696..e5d33d3 100644
--- a/docs/interpreter/markdown.md
+++ b/docs/interpreter/markdown.md
@@ -25,14 +25,42 @@ limitations under the License.
 
 ## Overview
 [Markdown](http://daringfireball.net/projects/markdown/) is a plain text formatting syntax designed so that it can be converted to HTML.
-Apache Zeppelin uses markdown4j. For more examples and extension support, please checkout [here](https://code.google.com/p/markdown4j/).  
+Apache Zeppelin uses [markdown4j](https://github.com/jdcasey/markdown4j) and [pegdown](https://github.com/sirthias/pegdown) as markdown parsers.
+
 In Zeppelin notebook, you can use ` %md ` in the beginning of a paragraph to invoke the Markdown interpreter and generate static html from Markdown plain text.
 
-In Zeppelin, Markdown interpreter is enabled by default.
+In Zeppelin, Markdown interpreter is enabled by default and uses the [markdown4j](https://github.com/jdcasey/markdown4j) parser.
 
 <img src="../assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png" width="60%" />
 
+## Configuration
+<table class="table-configuration">
+  <tr>
+    <th>Name</th>
+    <th>Default Value</th>
+    <th>Description</th>
+  </tr>
+  <tr>
+    <td>markdown.parser.type</td>
+    <td>markdown4j</td>
+    <td>Markdown Parser Type. <br/> Available values: markdown4j, pegdown.</td>
+  </tr>
+</table>
+
 ## Example
+
 The following example demonstrates the basic usage of Markdown in a Zeppelin notebook.
 
 <img src="../assets/themes/zeppelin/img/docs-img/markdown-example.png" width="70%" />
+
+### Markdown4j Parser
+
+`markdown4j` parser provides [YUML](http://yuml.me/) and [Websequence](https://www.websequencediagrams.com/) extensions 
+
+<img src="../assets/themes/zeppelin/img/docs-img/markdown-example-markdown4j-parser.png" width="70%" />
+
+### Pegdown Parser
+
+`pegdown` parser provides github flavored markdown.
+
+<img src="../assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png" width="70%" />

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/pom.xml
----------------------------------------------------------------------
diff --git a/markdown/pom.xml b/markdown/pom.xml
index 9a24b2c..6f25f3e 100644
--- a/markdown/pom.xml
+++ b/markdown/pom.xml
@@ -41,14 +41,20 @@
     </dependency> 
 
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+
+    <dependency>
       <groupId>org.commonjava.googlecode.markdown4j</groupId>
       <artifactId>markdown4j</artifactId>
       <version>2.2-cj-1.0</version>
     </dependency>
 
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
+      <groupId>org.pegdown</groupId>
+      <artifactId>pegdown</artifactId>
+      <version>1.6.0</version>
     </dependency>
 
     <dependency>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
deleted file mode 100644
index 4a26dac..0000000
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.zeppelin.markdown;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
-import org.apache.zeppelin.interpreter.Interpreter;
-import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.interpreter.InterpreterResult.Code;
-import org.apache.zeppelin.interpreter.InterpreterUtils;
-import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
-import org.apache.zeppelin.scheduler.Scheduler;
-import org.apache.zeppelin.scheduler.SchedulerFactory;
-import org.markdown4j.Markdown4jProcessor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Markdown interpreter for Zeppelin.
- */
-public class Markdown extends Interpreter {
-  private Markdown4jProcessor md;
-  static final Logger LOGGER = LoggerFactory.getLogger(Markdown.class);
-
-  public Markdown(Properties property) {
-    super(property);
-  }
-
-  @Override
-  public void open() {
-    md = new Markdown4jProcessor();
-  }
-
-  @Override
-  public void close() {}
-
-  @Override
-  public InterpreterResult interpret(String st, InterpreterContext interpreterContext) {
-    String html;
-    try {
-      html = md.process(st);
-    } catch (IOException | java.lang.RuntimeException e) {
-      LOGGER.error("Exception in Markdown while interpret ", e);
-      return new InterpreterResult(Code.ERROR, InterpreterUtils.getMostRelevantMessage(e));
-    }
-    return new InterpreterResult(Code.SUCCESS, "%html " + html);
-  }
-
-  @Override
-  public void cancel(InterpreterContext context) {}
-
-  @Override
-  public FormType getFormType() {
-    return FormType.SIMPLE;
-  }
-
-  @Override
-  public int getProgress(InterpreterContext context) {
-    return 0;
-  }
-
-  @Override
-  public Scheduler getScheduler() {
-    return SchedulerFactory.singleton().createOrGetParallelScheduler(
-        Markdown.class.getName() + this.hashCode(), 5);
-  }
-
-  @Override
-  public List<InterpreterCompletion> completion(String buf, int cursor) {
-    return null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java
new file mode 100644
index 0000000..68ca41b
--- /dev/null
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown4jParser.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zeppelin.markdown;
+
+import org.markdown4j.Markdown4jProcessor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+/** Markdown Parser using markdown4j processor . */
+public class Markdown4jParser implements MarkdownParser {
+  private Markdown4jProcessor processor;
+
+  public Markdown4jParser() {
+    processor = new Markdown4jProcessor();
+  }
+
+  @Override
+  public String render(String markdownText) {
+    String html = "";
+
+    try {
+      html = processor.process(markdownText);
+    } catch (IOException e) {
+      // convert checked exception to non-checked exception
+      throw new RuntimeException(e);
+    }
+
+    return html;
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownInterpreter.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownInterpreter.java b/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownInterpreter.java
new file mode 100644
index 0000000..ca2eb73
--- /dev/null
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownInterpreter.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zeppelin.markdown;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterPropertyBuilder;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResult.Code;
+import org.apache.zeppelin.interpreter.InterpreterUtils;
+import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
+import org.apache.zeppelin.scheduler.Scheduler;
+import org.apache.zeppelin.scheduler.SchedulerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/** MarkdownInterpreter interpreter for Zeppelin. */
+public class MarkdownInterpreter extends Interpreter {
+  private static final Logger LOGGER = LoggerFactory.getLogger(MarkdownInterpreter.class);
+
+  private MarkdownParser parser;
+
+  /** Markdown Parser Type. */
+  public enum MarkdownParserType {
+    PEGDOWN {
+      @Override
+      public String toString() {
+        return PARSER_TYPE_PEGDOWN;
+      }
+    },
+
+    MARKDOWN4j {
+      @Override
+      public String toString() {
+        return PARSER_TYPE_MARKDOWN4J;
+      }
+    }
+  }
+
+  public static final String MARKDOWN_PARSER_TYPE = "markdown.parser.type";
+  public static final String PARSER_TYPE_PEGDOWN = "pegdown";
+  public static final String PARSER_TYPE_MARKDOWN4J = "markdown4j";
+
+  public MarkdownInterpreter(Properties property) {
+    super(property);
+  }
+
+  public static MarkdownParser createMarkdownParser(String parserType) {
+    LOGGER.debug("Creating " + parserType + " markdown interpreter");
+
+    if (MarkdownParserType.PEGDOWN.toString().equals(parserType)) {
+      return new PegdownParser();
+    } else {
+      /** default parser. */
+      return new Markdown4jParser();
+    }
+  }
+
+  @Override
+  public void open() {
+    String parserType = getProperty(MARKDOWN_PARSER_TYPE);
+    parser = createMarkdownParser(parserType);
+  }
+
+  @Override
+  public void close() {}
+
+  @Override
+  public InterpreterResult interpret(String markdownText, InterpreterContext interpreterContext) {
+    String html;
+
+    try {
+      html = parser.render(markdownText);
+    } catch (RuntimeException e) {
+      LOGGER.error("Exception in MarkdownInterpreter while interpret ", e);
+      return new InterpreterResult(Code.ERROR, InterpreterUtils.getMostRelevantMessage(e));
+    }
+
+    return new InterpreterResult(Code.SUCCESS, "%html " + html);
+  }
+
+  @Override
+  public void cancel(InterpreterContext context) {}
+
+  @Override
+  public FormType getFormType() {
+    return FormType.SIMPLE;
+  }
+
+  @Override
+  public int getProgress(InterpreterContext context) {
+    return 0;
+  }
+
+  @Override
+  public Scheduler getScheduler() {
+    return SchedulerFactory.singleton()
+        .createOrGetParallelScheduler(MarkdownInterpreter.class.getName() + this.hashCode(), 5);
+  }
+
+  @Override
+  public List<InterpreterCompletion> completion(String buf, int cursor) {
+    return null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java b/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java
new file mode 100644
index 0000000..056ca26
--- /dev/null
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownParser.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zeppelin.markdown;
+
+/** Abstract Markdown Parser. */
+public interface MarkdownParser {
+  String render(String markdownText);
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java b/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java
new file mode 100644
index 0000000..bbadd97
--- /dev/null
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/PegdownParser.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zeppelin.markdown;
+
+import org.pegdown.Extensions;
+import org.pegdown.PegDownProcessor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/** Markdown Parser using pegdown processor. */
+public class PegdownParser implements MarkdownParser {
+  private PegDownProcessor processor;
+
+  public PegdownParser() {
+    int pegdownOptions = Extensions.ALL_WITH_OPTIONALS - Extensions.ANCHORLINKS;
+    int parsingTimeoutAsMillis = 5000;
+    processor = new PegDownProcessor(pegdownOptions, parsingTimeoutAsMillis);
+  }
+
+  @Override
+  public String render(String markdownText) {
+    String html = "";
+    String parsed = processor.markdownToHtml(markdownText);
+
+    if (null == parsed) {
+      throw new RuntimeException("Cannot parse markdown text to HTML using pegdown");
+    }
+
+    html = wrapWithMarkdownClassDiv(parsed);
+    return html;
+  }
+
+  /** wrap with markdown class div to styling DOM using css. */
+  public static String wrapWithMarkdownClassDiv(String html) {
+    return new StringBuilder()
+      .append("<div class=\"markdown-body\">\n")
+      .append(html)
+      .append("\n</div>")
+      .toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/main/resources/interpreter-setting.json
----------------------------------------------------------------------
diff --git a/markdown/src/main/resources/interpreter-setting.json b/markdown/src/main/resources/interpreter-setting.json
index 1e5d10c..78ad735 100644
--- a/markdown/src/main/resources/interpreter-setting.json
+++ b/markdown/src/main/resources/interpreter-setting.json
@@ -2,7 +2,14 @@
   {
     "group": "md",
     "name": "md",
-    "className": "org.apache.zeppelin.markdown.Markdown",
-    "properties": null
+    "className": "org.apache.zeppelin.markdown.MarkdownInterpreter",
+    "properties": {
+      "markdown.parser.type": {
+        "envName": "MARKDOWN_PARSER_TYPE",
+        "propertyName": "markdown.parser.type",
+        "defaultValue": "markdown4j",
+        "description": "Markdown Parser Type. Available values: markdown4j, pegdown. Default = markdown4j"
+      }
+    }
   }
 ]

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java
----------------------------------------------------------------------
diff --git a/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java b/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java
new file mode 100644
index 0000000..6da2757
--- /dev/null
+++ b/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zeppelin.markdown;
+
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+
+public class Markdown4jParserTest {
+
+  MarkdownInterpreter md;
+
+  @Before
+  public void setUp() throws Exception {
+    Properties props = new Properties();
+    props.put(MarkdownInterpreter.MARKDOWN_PARSER_TYPE, MarkdownInterpreter.PARSER_TYPE_MARKDOWN4J);
+    md = new MarkdownInterpreter(props);
+    md.open();
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    md.close();
+  }
+
+  @Test
+  public void testStrikethrough() {
+    InterpreterResult result = md.interpret("This is ~~deleted~~ text", null);
+    assertEquals("<p>This is <s>deleted</s> text</p>\n", result.message());
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/test/java/org/apache/zeppelin/markdown/MarkdownTest.java
----------------------------------------------------------------------
diff --git a/markdown/src/test/java/org/apache/zeppelin/markdown/MarkdownTest.java b/markdown/src/test/java/org/apache/zeppelin/markdown/MarkdownTest.java
deleted file mode 100644
index ae1c17e..0000000
--- a/markdown/src/test/java/org/apache/zeppelin/markdown/MarkdownTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.zeppelin.markdown;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Properties;
-
-import org.apache.zeppelin.interpreter.InterpreterResult;
-import org.apache.zeppelin.markdown.Markdown;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class MarkdownTest {
-
-	@Before
-	public void setUp() throws Exception {
-	}
-
-	@After
-	public void tearDown() throws Exception {
-	}
-
-	@Test
-	public void test() {
-		Markdown md = new Markdown(new Properties());
-		md.open();
-		InterpreterResult result = md.interpret("This is ~~deleted~~ text", null);
-		assertEquals("<p>This is <s>deleted</s> text</p>\n", result.message());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java
----------------------------------------------------------------------
diff --git a/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java b/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java
new file mode 100644
index 0000000..66d6d76
--- /dev/null
+++ b/markdown/src/test/java/org/apache/zeppelin/markdown/PegdownParserTest.java
@@ -0,0 +1,302 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zeppelin.markdown;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Properties;
+
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import static org.apache.zeppelin.markdown.PegdownParser.wrapWithMarkdownClassDiv;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class PegdownParserTest {
+
+  MarkdownInterpreter md;
+
+  @Before
+  public void setUp() throws Exception {
+    Properties props = new Properties();
+    props.put(MarkdownInterpreter.MARKDOWN_PARSER_TYPE, MarkdownInterpreter.PARSER_TYPE_PEGDOWN);
+    md = new MarkdownInterpreter(props);
+    md.open();
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    md.close();
+  }
+
+  @Test
+  public void testHeader() {
+    InterpreterResult r1 = md.interpret("# H1", null);
+    assertEquals(wrapWithMarkdownClassDiv("<h1>H1</h1>"), r1.message());
+
+    InterpreterResult r2 = md.interpret("## H2", null);
+    assertEquals(wrapWithMarkdownClassDiv("<h2>H2</h2>"), r2.message());
+
+    InterpreterResult r3 = md.interpret("### H3", null);
+    assertEquals(wrapWithMarkdownClassDiv("<h3>H3</h3>"), r3.message());
+
+    InterpreterResult r4 = md.interpret("#### H4", null);
+    assertEquals(wrapWithMarkdownClassDiv("<h4>H4</h4>"), r4.message());
+
+    InterpreterResult r5 = md.interpret("##### H5", null);
+    assertEquals(wrapWithMarkdownClassDiv("<h5>H5</h5>"), r5.message());
+
+    InterpreterResult r6 = md.interpret("###### H6", null);
+    assertEquals(wrapWithMarkdownClassDiv("<h6>H6</h6>"), r6.message());
+
+    InterpreterResult r7 = md.interpret("Alt-H1\n" + "======", null);
+    assertEquals(wrapWithMarkdownClassDiv("<h1>Alt-H1</h1>"), r7.message());
+
+    InterpreterResult r8 = md.interpret("Alt-H2\n" + "------", null);
+    assertEquals(wrapWithMarkdownClassDiv("<h2>Alt-H2</h2>"), r8.message());
+  }
+
+  @Test
+  public void testStrikethrough() {
+    InterpreterResult result = md.interpret("This is ~~deleted~~ text", null);
+    assertEquals(
+        wrapWithMarkdownClassDiv("<p>This is <del>deleted</del> text</p>"), result.message());
+  }
+
+  @Test
+  public void testItalics() {
+    InterpreterResult result = md.interpret("This is *italics* text", null);
+    assertEquals(
+        wrapWithMarkdownClassDiv("<p>This is <em>italics</em> text</p>"), result.message());
+  }
+
+  @Test
+  public void testStrongEmphasis() {
+    InterpreterResult result = md.interpret("This is **strong emphasis** text", null);
+    assertEquals(
+        wrapWithMarkdownClassDiv("<p>This is <strong>strong emphasis</strong> text</p>"),
+        result.message());
+  }
+
+  @Test
+  public void testOrderedList() {
+    String input =
+        new StringBuilder()
+            .append("1. First ordered list item\n")
+            .append("2. Another item")
+            .toString();
+
+    String expected =
+        new StringBuilder()
+            .append("<ol>\n")
+            .append("  <li>First ordered list item</li>\n")
+            .append("  <li>Another item</li>\n")
+            .append("</ol>")
+            .toString();
+
+    InterpreterResult result = md.interpret(input, null);
+    assertEquals(wrapWithMarkdownClassDiv(expected), result.message());
+  }
+
+  @Test
+  public void testUnorderedList() {
+    String input =
+        new StringBuilder()
+            .append("* Unordered list can use asterisks\n")
+            .append("- Or minuses\n")
+            .append("+ Or pluses")
+            .toString();
+
+    String expected =
+        new StringBuilder()
+            .append("<ul>\n")
+            .append("  <li>Unordered list can use asterisks</li>\n")
+            .append("  <li>Or minuses</li>\n")
+            .append("  <li>Or pluses</li>\n")
+            .append("</ul>")
+            .toString();
+
+    InterpreterResult result = md.interpret(input, null);
+    assertEquals(wrapWithMarkdownClassDiv(expected), result.message());
+  }
+
+  @Test
+  public void testLinks() {
+    String input =
+        new StringBuilder()
+            .append("[I'm an inline-style link](https://www.google.com)\n")
+            .append("\n")
+            .append(
+                "[I'm an inline-style link with title](https://www.google.com \"Google's Homepage\")\n")
+            .append("\n")
+            .append("[I'm a reference-style link][Arbitrary case-insensitive reference text]\n")
+            .append("\n")
+            .append("[I'm a relative reference to a repository file](../blob/master/LICENSE)\n")
+            .append("\n")
+            .append("[You can use numbers for reference-style link definitions][1]\n")
+            .append("\n")
+            .append("Or leave it empty and use the [link text itself].\n")
+            .append("\n")
+            .append("URLs and URLs in angle brackets will automatically get turned into links. \n")
+            .append("http://www.example.com or <http://www.example.com> and sometimes \n")
+            .append("example.com (but not on Github, for example).\n")
+            .append("\n")
+            .append("Some text to show that the reference links can follow later.\n")
+            .append("\n")
+            .append("[arbitrary case-insensitive reference text]: https://www.mozilla.org\n")
+            .append("[1]: http://slashdot.org\n")
+            .append("[link text itself]: http://www.reddit.com")
+            .toString();
+
+    String expected =
+        new StringBuilder()
+            .append(
+                "<p><a href=\"https://www.google.com\">I&rsquo;m an inline-style link</a></p>\n")
+            .append(
+                "<p><a href=\"https://www.google.com\" title=\"Google&#39;s Homepage\">I&rsquo;m an inline-style link with title</a></p>\n")
+            .append(
+                "<p><a href=\"https://www.mozilla.org\">I&rsquo;m a reference-style link</a></p>\n")
+            .append(
+                "<p><a href=\"../blob/master/LICENSE\">I&rsquo;m a relative reference to a repository file</a></p>\n")
+            .append(
+                "<p><a href=\"http://slashdot.org\">You can use numbers for reference-style link definitions</a></p>\n")
+            .append(
+                "<p>Or leave it empty and use the <a href=\"http://www.reddit.com\">link text itself</a>.</p>\n")
+            .append(
+                "<p>URLs and URLs in angle brackets will automatically get turned into links.<br/><a href=\"http://www.example.com\">http://www.example.com</a> or <a href=\"http://www.example.com\">http://www.example.com</a> and sometimes<br/>example.com (but not on Github, for example).</p>\n")
+            .append("<p>Some text to show that the reference links can follow later.</p>")
+            .toString();
+
+    InterpreterResult result = md.interpret(input, null);
+    assertEquals(wrapWithMarkdownClassDiv(expected), result.message());
+  }
+
+  @Test
+  public void testInlineCode() {
+    InterpreterResult result = md.interpret("Inline `code` has `back-ticks around` it.", null);
+    assertEquals(
+        wrapWithMarkdownClassDiv(
+            "<p>Inline <code>code</code> has <code>back-ticks around</code> it.</p>"),
+        result.message());
+  }
+
+  @Test
+  public void testBlockQuotes() {
+    InterpreterResult r1 =
+        md.interpret(
+            "> Blockquotes are very handy in email to emulate reply text.\n"
+                + "> This line is part of the same quote.",
+            null);
+    assertEquals(
+        wrapWithMarkdownClassDiv(
+            "<blockquote>\n"
+                + "  <p>Blockquotes are very handy in email to emulate reply text.<br/>This line is part of the same quote.</p>\n"
+                + "</blockquote>"),
+        r1.message());
+
+    InterpreterResult r2 =
+        md.interpret(
+            "> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **MarkdownInterpreter** into a blockquote. ",
+            null);
+    assertEquals(
+        wrapWithMarkdownClassDiv(
+            "<blockquote>\n"
+                + "  <p>This is a very long line that will still be quoted properly when it wraps. Oh boy let&rsquo;s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can <em>put</em> <strong>MarkdownInterpreter</strong> into a blockquote. </p>\n"
+                + "</blockquote>"),
+        r2.message());
+  }
+
+  @Test
+  public void testSimpleTable() {
+    String input =
+        new StringBuilder()
+            .append("MarkdownInterpreter | Less | Pretty\n")
+            .append("--- | --- | ---\n")
+            .append("*Still* | `renders` | **nicely**\n")
+            .append("1 | 2 | 3")
+            .toString();
+
+    String expected =
+        new StringBuilder()
+            .append("<table>\n")
+            .append("  <thead>\n")
+            .append("    <tr>\n")
+            .append("      <th>MarkdownInterpreter </th>\n")
+            .append("      <th>Less </th>\n")
+            .append("      <th>Pretty</th>\n")
+            .append("    </tr>\n")
+            .append("  </thead>\n")
+            .append("  <tbody>\n")
+            .append("    <tr>\n")
+            .append("      <td><em>Still</em> </td>\n")
+            .append("      <td><code>renders</code> </td>\n")
+            .append("      <td><strong>nicely</strong></td>\n")
+            .append("    </tr>\n")
+            .append("    <tr>\n")
+            .append("      <td>1 </td>\n")
+            .append("      <td>2 </td>\n")
+            .append("      <td>3</td>\n")
+            .append("    </tr>\n")
+            .append("  </tbody>\n")
+            .append("</table>")
+            .toString();
+
+    InterpreterResult result = md.interpret(input, null);
+    assertEquals(wrapWithMarkdownClassDiv(expected), result.message());
+  }
+
+  @Test
+  public void testAlignedTable() {
+
+    String input =
+        new StringBuilder()
+            .append("| First Header | Second Header |         Third Header |\n")
+            .append("| :----------- | :-----------: | -------------------: |\n")
+            .append("| First row    |      Data     | Very long data entry |\n")
+            .append("| Second row   |    **Cell**   |               *Cell* |")
+            .toString();
+
+    String expected =
+        new StringBuilder()
+            .append("<table>\n")
+            .append("  <thead>\n")
+            .append("    <tr>\n")
+            .append("      <th align=\"left\">First Header </th>\n")
+            .append("      <th align=\"center\">Second Header </th>\n")
+            .append("      <th align=\"right\">Third Header </th>\n")
+            .append("    </tr>\n")
+            .append("  </thead>\n")
+            .append("  <tbody>\n")
+            .append("    <tr>\n")
+            .append("      <td align=\"left\">First row </td>\n")
+            .append("      <td align=\"center\">Data </td>\n")
+            .append("      <td align=\"right\">Very long data entry </td>\n")
+            .append("    </tr>\n")
+            .append("    <tr>\n")
+            .append("      <td align=\"left\">Second row </td>\n")
+            .append("      <td align=\"center\"><strong>Cell</strong> </td>\n")
+            .append("      <td align=\"right\"><em>Cell</em> </td>\n")
+            .append("    </tr>\n")
+            .append("  </tbody>\n")
+            .append("</table>")
+            .toString();
+
+    InterpreterResult result = md.interpret(input, null);
+    assertEquals(wrapWithMarkdownClassDiv(expected), result.message());
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/zeppelin-distribution/src/bin_license/LICENSE
----------------------------------------------------------------------
diff --git a/zeppelin-distribution/src/bin_license/LICENSE b/zeppelin-distribution/src/bin_license/LICENSE
index b33ad64..e599084 100644
--- a/zeppelin-distribution/src/bin_license/LICENSE
+++ b/zeppelin-distribution/src/bin_license/LICENSE
@@ -115,6 +115,9 @@ The following components are provided under Apache License.
     (Apache 2.0) Servlet API (org.mortbay.jetty:servlet-api:2.5-20081211 - https://en.wikipedia.org/wiki/Jetty_(web_server))
     (Apache 2.0) Google HTTP Client Library for Java (com.google.http-client:google-http-client-jackson2:1.21.0 - https://github.com/google/google-http-java-client/tree/dev/google-http-client-jackson2)
     (Apache 2.0) angular-esri-map (https://github.com/Esri/angular-esri-map)
+    (Apache 2.0) pegdown (org.pegdown:pegdown:1.6.0 - https://github.com/sirthias/pegdown)
+    (Apache 2.0) parboiled-java (org.parboiled:parboiled-java:1.1.7 - https://github.com/sirthias/parboiled)
+    (Apache 2.0) parboiled-core (org.parboiled:parboiled-core:1.1.7 - https://github.com/sirthias/parboiled)
 
 ========================================================================
 MIT licenses
@@ -151,6 +154,7 @@ The text of each license is also included at licenses/LICENSE-[project]-[version
     (The MIT License) bcprov-jdk15on v1.51 (org.bouncycastle:bcprov-jdk15on:jar:1.51 - http://www.bouncycastle.org/java.html) - http://www.bouncycastle.org/licence.html
     (The MIT License) AnchorJS (https://github.com/bryanbraun/anchorjs) - https://github.com/bryanbraun/anchorjs/blob/master/README.md#license
     (The MIT License) moment-duration-format v1.3.0 (https://github.com/jsmreese/moment-duration-format) - https://github.com/jsmreese/moment-duration-format/blob/master/LICENSE
+    (The MIT License) github-markdown-css 2.4.0 (https://github.com/sindresorhus/github-markdown-css) - https://github.com/sindresorhus/github-markdown-css/blob/gh-pages/license
 
 The following components are provided under the MIT License.
 
@@ -191,10 +195,13 @@ The following components are provided under the BSD-style License.
     (BSD-like) Scala Actors library (org.scala-lang:scala-actors:2.11.7 - http://www.scala-lang.org/)
     (BSD-like) Scala Compiler (org.scala-lang:scala-compiler:2.11.7 - http://www.scala-lang.org/)
     (BSD-like) Scala Compiler (org.scala-lang:scala-reflect:2.11.7 - http://www.scala-lang.org/)
-    (BSD-like) ASM (asm:asm:jar:3.1 - http://asm.ow2.org/) - Copyright (c) 2000-2011 INRIA, France Telecom
+    (BSD-like) ASM asm (asm:asm:jar:3.1 - http://asm.ow2.org/) - Copyright (c) 2000-2011 INRIA, France Telecom
+    (BSD-like) ASM asm-tree (org.ow2.asm:asm-tree:5.0.3 - http://asm.ow2.org/) - Copyright (c) 2000-2011 INRIA, France Telecom
+    (BSD-like) ASM asm-analysis (org.ow2.asm:asm-analysis:5.0.3 - http://asm.ow2.org/) - Copyright (c) 2000-2011 INRIA, France Telecom
+    (BSD-like) ASM asm-utils (org.ow2.asm:asm-utils:5.0.3 - http://asm.ow2.org/) - Copyright (c) 2000-2011 INRIA, France Telecom
+    (New BSD License) Markdown4j (org.commonjava.googlecode.markdown4j:markdown4j:jar:2.2-cj-1.0 - https://code.google.com/p/markdown4j/)
     (New BSD License) Py4J (net.sf.py4j:py4j:0.9 - http://py4j.sourceforge.net/)
     (New BSD License) Py4J (net.sf.py4j:py4j:0.10.1 - http://py4j.sourceforge.net/) - https://github.com/bartdag/py4j/blob/0.10.1/LICENSE.txt
-    (New BSD License) Markdown4j (org.commonjava.googlecode.markdown4j:markdown4j:jar:2.2-cj-1.0 - https://code.google.com/p/markdown4j/)
     (BSD 3 Clause) Paranamer (com.thoughtworks.paranamer:paranamer:jar:2.6) - https://github.com/paul-hammant/paranamer/blob/paranamer-parent-2.6/LICENSE.txt
     (BSD 3 Clause) netlib core (com.github.fommil.netlib:core:1.1.2 - https://github.com/fommil/netlib-java/core)
     (BSD 3 Clause) JPMML-Model (org.jpmml:pmml-model:1.2.7 - https://github.com/jpmml/jpmml-model)

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/zeppelin-distribution/src/bin_license/licenses/LICENSE-github-markdown-css-2.4.0
----------------------------------------------------------------------
diff --git a/zeppelin-distribution/src/bin_license/licenses/LICENSE-github-markdown-css-2.4.0 b/zeppelin-distribution/src/bin_license/licenses/LICENSE-github-markdown-css-2.4.0
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/zeppelin-distribution/src/bin_license/licenses/LICENSE-github-markdown-css-2.4.0
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <si...@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/zeppelin-web/bower.json
----------------------------------------------------------------------
diff --git a/zeppelin-web/bower.json b/zeppelin-web/bower.json
index e20493f..5ec18a7 100644
--- a/zeppelin-web/bower.json
+++ b/zeppelin-web/bower.json
@@ -33,7 +33,8 @@
     "handsontable": "~0.24.2",
     "moment-duration-format": "^1.3.0",
     "select2": "^4.0.3",
-    "angular-esri-map": "~2.0.0"
+    "angular-esri-map": "~2.0.0",
+    "github-markdown-css": "^2.4.0"
   },
   "devDependencies": {
     "angular-mocks": "1.5.0"

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/46cd56ad/zeppelin-web/src/index.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/index.html b/zeppelin-web/src/index.html
index 9a8ae6f..9b04955 100644
--- a/zeppelin-web/src/index.html
+++ b/zeppelin-web/src/index.html
@@ -46,6 +46,7 @@ limitations under the License.
     <link rel="stylesheet" href="bower_components/bootstrap3-dialog/dist/css/bootstrap-dialog.min.css" />
     <link rel="stylesheet" href="bower_components/pikaday/css/pikaday.css" />
     <link rel="stylesheet" href="bower_components/handsontable/dist/handsontable.css" />
+    <link rel="stylesheet" href="bower_components/github-markdown-css/github-markdown.css" />
     <!-- endbower -->
     <link rel="stylesheet" href="bower_components/jquery-ui/themes/base/jquery-ui.css" />
     <link rel="stylesheet" href="bower_components/select2/dist/css/select2.css" />