forked from highlightjs/highlight.js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(markdown) much improved markdown support (highlightjs#2382)
* basic nested bold/italics support * bold and italic can contain links and html * blockquote can contain other markup * language (dart) should not get bonus points for embedded markdown * much better code block support * test emphasis vs bullets * remove space from end of bullets
- Loading branch information
1 parent
fd47bd9
commit 0db52b3
Showing
10 changed files
with
259 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<span class="hljs-emphasis">_Italic_</span> | ||
<span class="hljs-emphasis">*Italic*</span> | ||
<span class="hljs-strong">__Bold__</span> | ||
<span class="hljs-strong">**Bold**</span> | ||
<span class="hljs-emphasis">*Is <span class="hljs-strong">__Combined__</span>*</span> | ||
<span class="hljs-strong">__Bold <span class="hljs-emphasis">*then italic*</span>__</span> | ||
<span class="hljs-strong">**Bold <span class="hljs-emphasis">_then italic_</span>**</span> | ||
<span class="hljs-strong">**Bold and <span class="xml"><span class="hljs-tag"><<span class="hljs-name">br</span>/></span></span>**</span> | ||
<span class="hljs-strong">**<span class="hljs-emphasis">_[<span class="hljs-string">this</span>](<span class="hljs-link">https://google.com</span>)_</span>**</span> | ||
|
||
<span class="hljs-quote">> quoted <span class="hljs-strong">**Bold <span class="hljs-emphasis">_then italic_</span>**</span></span> | ||
<span class="hljs-quote">> <span class="hljs-emphasis">_[<span class="hljs-string">this</span>](<span class="hljs-link">https://google.com</span>)_</span></span> | ||
|
||
<span class="hljs-emphasis">*this is a emphasized paragraph*</span> | ||
<span class="hljs-emphasis">*this is too*</span> | ||
|
||
<span class="hljs-bullet">*</span> list with a <span class="hljs-emphasis">*italic item*</span> | ||
<span class="hljs-bullet">*</span> list with a <span class="hljs-strong">**bold item**</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_Italic_ | ||
*Italic* | ||
__Bold__ | ||
**Bold** | ||
*Is __Combined__* | ||
__Bold *then italic*__ | ||
**Bold _then italic_** | ||
**Bold and <br/>** | ||
**_[this](https://google.com)_** | ||
|
||
> quoted **Bold _then italic_** | ||
> _[this](https://google.com)_ | ||
|
||
*this is a emphasized paragraph* | ||
*this is too* | ||
|
||
* list with a *italic item* | ||
* list with a **bold item** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,38 @@ | ||
<span class="hljs-code"> var code = true;</span> | ||
|
||
<span class="hljs-code"> var code = true; | ||
var code = false; | ||
</span> | ||
|
||
<span class="hljs-code">```javascript | ||
var code = true; | ||
```</span> | ||
|
||
<span class="hljs-code">````md | ||
``` | ||
a = 'This is a code block in python' | ||
``` | ||
````</span> | ||
|
||
<span class="hljs-code">~~~ | ||
tilde can be used also (github) | ||
~~~</span> | ||
|
||
<span class="hljs-code">~~~~ ruby startline=3 $%@#$ | ||
def foo(x) | ||
return 3 | ||
end | ||
~~~~~~~</span> | ||
|
||
<span class="hljs-code">~~~~~~~something | ||
code here | ||
~~~~~~~</span> | ||
|
||
<span class="hljs-code">``` | ||
aaa | ||
~~~ | ||
```</span> | ||
|
||
<span class="hljs-code">```javascript | ||
can be indented | ||
```</span> | ||
|
||
Inline <span class="hljs-code">`code`</span>, and <span class="hljs-code">`more code`</span>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,38 @@ | ||
var code = true; | ||
var code = false; | ||
|
||
|
||
```javascript | ||
var code = true; | ||
``` | ||
|
||
````md | ||
``` | ||
a = 'This is a code block in python' | ||
``` | ||
```` | ||
|
||
~~~ | ||
tilde can be used also (github) | ||
~~~ | ||
|
||
~~~~ ruby startline=3 $%@#$ | ||
def foo(x) | ||
return 3 | ||
end | ||
~~~~~~~ | ||
|
||
~~~~~~~something | ||
code here | ||
~~~~~~~ | ||
|
||
``` | ||
aaa | ||
~~~ | ||
``` | ||
|
||
```javascript | ||
can be indented | ||
``` | ||
|
||
Inline `code`, and `more code`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<span class="hljs-bullet">- </span>this is a list | ||
<span class="hljs-bullet">- </span>this is another | ||
<span class="hljs-bullet"> - </span>nested list | ||
<span class="hljs-bullet"> - </span>another nested | ||
<span class="hljs-bullet"> * </span>nested alternative | ||
<span class="hljs-bullet">-</span> this is a list | ||
<span class="hljs-bullet">-</span> this is another | ||
<span class="hljs-bullet"> -</span> nested list | ||
<span class="hljs-bullet"> -</span> another nested | ||
<span class="hljs-bullet"> *</span> nested alternative |
Oops, something went wrong.