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 00000000000..e3455e31ce3 Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/markdown-example-markdown4j-parser.png differ 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 00000000000..21e8bc5bb7c Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png differ 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 7b294e1eb11..33c13ec31ba 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 diff --git a/docs/interpreter/markdown.md b/docs/interpreter/markdown.md index 5aeb6960c92..e5d33d321ad 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. +## Configuration + + + + + + + + + + + +
NameDefault ValueDescription
markdown.parser.typemarkdown4jMarkdown Parser Type.
Available values: markdown4j, pegdown.
+ ## Example + The following example demonstrates the basic usage of Markdown in a Zeppelin notebook. + +### Markdown4j Parser + +`markdown4j` parser provides [YUML](http://yuml.me/) and [Websequence](https://www.websequencediagrams.com/) extensions + + + +### Pegdown Parser + +`pegdown` parser provides github flavored markdown. + + diff --git a/markdown/pom.xml b/markdown/pom.xml index 9a24b2cbbca..6f25f3e8e1e 100644 --- a/markdown/pom.xml +++ b/markdown/pom.xml @@ -40,6 +40,11 @@ provided + + org.slf4j + slf4j-api + + org.commonjava.googlecode.markdown4j markdown4j @@ -47,8 +52,9 @@ - org.slf4j - slf4j-api + org.pegdown + pegdown + 1.6.0 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 00000000000..68ca41b3fc9 --- /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; + } +} diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java b/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownInterpreter.java similarity index 55% rename from markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java rename to markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownInterpreter.java index 4a26dac0fe8..ca2eb7356e1 100644 --- a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java +++ b/markdown/src/main/java/org/apache/zeppelin/markdown/MarkdownInterpreter.java @@ -23,44 +23,78 @@ 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.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); +/** 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 Markdown(Properties property) { + 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() { - md = new Markdown4jProcessor(); + String parserType = getProperty(MARKDOWN_PARSER_TYPE); + parser = createMarkdownParser(parserType); } @Override public void close() {} @Override - public InterpreterResult interpret(String st, InterpreterContext interpreterContext) { + public InterpreterResult interpret(String markdownText, InterpreterContext interpreterContext) { String html; + try { - html = md.process(st); - } catch (IOException | java.lang.RuntimeException e) { - LOGGER.error("Exception in Markdown while interpret ", e); + 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); } @@ -79,8 +113,8 @@ public int getProgress(InterpreterContext context) { @Override public Scheduler getScheduler() { - return SchedulerFactory.singleton().createOrGetParallelScheduler( - Markdown.class.getName() + this.hashCode(), 5); + return SchedulerFactory.singleton() + .createOrGetParallelScheduler(MarkdownInterpreter.class.getName() + this.hashCode(), 5); } @Override 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 00000000000..056ca26ca80 --- /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); +} 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 00000000000..bbadd977d8e --- /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("
\n") + .append(html) + .append("\n
") + .toString(); + } +} diff --git a/markdown/src/main/resources/interpreter-setting.json b/markdown/src/main/resources/interpreter-setting.json index 1e5d10c31fa..78ad7359117 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" + } + } } ] diff --git a/markdown/src/test/java/org/apache/zeppelin/markdown/MarkdownTest.java b/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java similarity index 64% rename from markdown/src/test/java/org/apache/zeppelin/markdown/MarkdownTest.java rename to markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java index ae1c17e7592..6da2757149a 100644 --- a/markdown/src/test/java/org/apache/zeppelin/markdown/MarkdownTest.java +++ b/markdown/src/test/java/org/apache/zeppelin/markdown/Markdown4jParserTest.java @@ -17,32 +17,35 @@ 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 { +import java.util.Properties; + +import static org.junit.Assert.assertEquals; + +public class Markdown4jParserTest { - @Before - public void setUp() throws Exception { - } + MarkdownInterpreter md; - @After - public void tearDown() throws Exception { - } + @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(); + } - @Test - public void test() { - Markdown md = new Markdown(new Properties()); - md.open(); - InterpreterResult result = md.interpret("This is ~~deleted~~ text", null); - assertEquals("

This is deleted text

\n", result.message()); - } + @After + public void tearDown() throws Exception { + md.close(); + } + @Test + public void testStrikethrough() { + InterpreterResult result = md.interpret("This is ~~deleted~~ text", null); + assertEquals("

This is deleted text

\n", result.message()); + } } 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 00000000000..66d6d7681a0 --- /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

"), r1.message()); + + InterpreterResult r2 = md.interpret("## H2", null); + assertEquals(wrapWithMarkdownClassDiv("

H2

"), r2.message()); + + InterpreterResult r3 = md.interpret("### H3", null); + assertEquals(wrapWithMarkdownClassDiv("

H3

"), r3.message()); + + InterpreterResult r4 = md.interpret("#### H4", null); + assertEquals(wrapWithMarkdownClassDiv("

H4

"), r4.message()); + + InterpreterResult r5 = md.interpret("##### H5", null); + assertEquals(wrapWithMarkdownClassDiv("
H5
"), r5.message()); + + InterpreterResult r6 = md.interpret("###### H6", null); + assertEquals(wrapWithMarkdownClassDiv("
H6
"), r6.message()); + + InterpreterResult r7 = md.interpret("Alt-H1\n" + "======", null); + assertEquals(wrapWithMarkdownClassDiv("

Alt-H1

"), r7.message()); + + InterpreterResult r8 = md.interpret("Alt-H2\n" + "------", null); + assertEquals(wrapWithMarkdownClassDiv("

Alt-H2

"), r8.message()); + } + + @Test + public void testStrikethrough() { + InterpreterResult result = md.interpret("This is ~~deleted~~ text", null); + assertEquals( + wrapWithMarkdownClassDiv("

This is deleted text

"), result.message()); + } + + @Test + public void testItalics() { + InterpreterResult result = md.interpret("This is *italics* text", null); + assertEquals( + wrapWithMarkdownClassDiv("

This is italics text

"), result.message()); + } + + @Test + public void testStrongEmphasis() { + InterpreterResult result = md.interpret("This is **strong emphasis** text", null); + assertEquals( + wrapWithMarkdownClassDiv("

This is strong emphasis text

"), + 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("
    \n") + .append("
  1. First ordered list item
  2. \n") + .append("
  3. Another item
  4. \n") + .append("
") + .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("") + .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 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( + "

I’m an inline-style link

\n") + .append( + "

I’m an inline-style link with title

\n") + .append( + "

I’m a reference-style link

\n") + .append( + "

I’m a relative reference to a repository file

\n") + .append( + "

You can use numbers for reference-style link definitions

\n") + .append( + "

Or leave it empty and use the link text itself.

\n") + .append( + "

URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or http://www.example.com and sometimes
example.com (but not on Github, for example).

\n") + .append("

Some text to show that the reference links can follow later.

") + .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( + "

Inline code has back-ticks around it.

"), + 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( + "
\n" + + "

Blockquotes are very handy in email to emulate reply text.
This line is part of the same quote.

\n" + + "
"), + 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( + "
\n" + + "

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.

\n" + + "
"), + 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("\n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append("
MarkdownInterpreter Less Pretty
Still renders nicely
1 2 3
") + .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("\n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n") + .append("
First Header Second Header Third Header
First row Data Very long data entry
Second row Cell Cell
") + .toString(); + + InterpreterResult result = md.interpret(input, null); + assertEquals(wrapWithMarkdownClassDiv(expected), result.message()); + } +} diff --git a/zeppelin-distribution/src/bin_license/LICENSE b/zeppelin-distribution/src/bin_license/LICENSE index b33ad64b108..e599084904b 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) 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 00000000000..654d0bfe943 --- /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 (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. diff --git a/zeppelin-web/bower.json b/zeppelin-web/bower.json index e20493fa7fc..5ec18a75bdb 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" diff --git a/zeppelin-web/src/index.html b/zeppelin-web/src/index.html index 9a8ae6fbb88..9b049552d59 100644 --- a/zeppelin-web/src/index.html +++ b/zeppelin-web/src/index.html @@ -46,6 +46,7 @@ +