mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Update: interpreter setting and docs
This commit is contained in:
parent
de3549d8a9
commit
13e0dc42a7
5 changed files with 17 additions and 16 deletions
4
STYLE.md
4
STYLE.md
|
|
@ -7,7 +7,7 @@ app/styles/looknfeel
|
|||
Overall look and theme of the Zeppelin notebook page can be customized here.
|
||||
|
||||
### Code Syntax Highlighting
|
||||
There are two parts to code highlighting. First, Zeppelin uses the Ace Editor for its note paragraphs. Color style for this can be changed by setting theme on the editor instance. Second, Zeppelin's Markdown interpreter calls markdown4j to emit HTML, and such content may contain <pre><code> tags that can be consumed by Highlight.js.
|
||||
There are two parts to code highlighting. First, Zeppelin uses the Ace Editor for its note paragraphs. Color style for this can be changed by setting theme on the editor instance. Second, Zeppelin's Markdown interpreter calls pegdown parser to emit HTML, and such content may contain <pre><code> tags that can be consumed by Highlight.js.
|
||||
|
||||
#### Theme on Ace Editor
|
||||
app/scripts/controllers/paragraph.js
|
||||
|
|
@ -16,7 +16,7 @@ Call setTheme on the editor with the theme path/name.
|
|||
[List of themes on GitHub](https://github.com/ajaxorg/ace/tree/master/lib/ace/theme)
|
||||
|
||||
#### Style for Markdown Code Blocks
|
||||
Highlight.js parses and converts <pre><code> blocks from markdown4j into keywords and language syntax with proper styles. It also attempts to infer the best fitting language if it is not provided. The visual style can be changed by simply including the desired [stylesheet](https://github.com/components/highlightjs/tree/master/styles) into app/index.html. See the next section on build.
|
||||
Highlight.js parses and converts <pre><code> blocks from pegdown parser into keywords and language syntax with proper styles. It also attempts to infer the best fitting language if it is not provided. The visual style can be changed by simply including the desired [stylesheet](https://github.com/components/highlightjs/tree/master/styles) into app/index.html. See the next section on build.
|
||||
|
||||
Note that code block background color is overriden in app/styles/notebook.css (look for .paragraph .tableDisplay .hljs).
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 258 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 77 KiB |
|
|
@ -25,11 +25,11 @@ 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](https://github.com/jdcasey/markdown4j) and [pegdown](https://github.com/sirthias/pegdown) as markdown parsers.
|
||||
Apache Zeppelin uses [pegdown](https://github.com/sirthias/pegdown) and [markdown4j](https://github.com/jdcasey/markdown4j) 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 and uses the [markdown4j](https://github.com/jdcasey/markdown4j) parser.
|
||||
In Zeppelin, Markdown interpreter is enabled by default and uses the [pegdown](https://github.com/sirthias/pegdown) parser.
|
||||
|
||||
<img src="../assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png" width="60%" />
|
||||
|
||||
|
|
@ -42,8 +42,8 @@ In Zeppelin, Markdown interpreter is enabled by default and uses the [markdown4j
|
|||
</tr>
|
||||
<tr>
|
||||
<td>markdown.parser.type</td>
|
||||
<td>markdown4j</td>
|
||||
<td>Markdown Parser Type. <br/> Available values: markdown4j, pegdown.</td>
|
||||
<td>pegdown</td>
|
||||
<td>Markdown Parser Type. <br/> Available values: pegdown, markdown4j.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
@ -57,16 +57,17 @@ The following example demonstrates the basic usage of Markdown in a Zeppelin not
|
|||
|
||||
Markdown interpreter leverages %html display system internally. That means you can mix mathematical expressions with markdown syntax. For more information, please see [Mathematical Expression](../displaysystem/basicdisplaysystem.html#mathematical-expressions) section.
|
||||
|
||||
### Markdown4j Parser
|
||||
|
||||
The markdown interpreter provides github flavored markdown.
|
||||
|
||||
`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%" />
|
||||
|
||||
`pegdown` parser provides [YUML](http://yuml.me/) and [Websequence](https://www.websequencediagrams.com/) plugins also.
|
||||
|
||||
<img src="../assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser-plugins.png" width="70%" />
|
||||
|
||||
### Markdown4j Parser
|
||||
|
||||
Keeps for the backward compatibility
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
"markdown.parser.type": {
|
||||
"envName": "MARKDOWN_PARSER_TYPE",
|
||||
"propertyName": "markdown.parser.type",
|
||||
"defaultValue": "markdown4j",
|
||||
"description": "Markdown Parser Type. Available values: markdown4j, pegdown. Default = markdown4j"
|
||||
"defaultValue": "pegdown",
|
||||
"description": "Markdown Parser Type. Available values: pegdown, markdown4j. Default = pegdown"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue