update markdown parser and css
This commit is contained in:
parent
46f2fa516e
commit
c3d51860c3
2 changed files with 3 additions and 10 deletions
|
@ -1971,7 +1971,7 @@ SourceViewer
|
||||||
font-family: Menlo, Monaco, DejaVu Sans Mono, Bitstream Vera Sans Mono, Consolas, Lucida Console, monospace;
|
font-family: Menlo, Monaco, DejaVu Sans Mono, Bitstream Vera Sans Mono, Consolas, Lucida Console, monospace;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
.OxSourceViewer td.OxComment > pre > code {
|
.OxSourceViewer td.OxComment > pre {
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
margin: 4px 0 4px 0;
|
margin: 4px 0 4px 0;
|
||||||
font-family: Menlo, Monaco, DejaVu Sans Mono, Bitstream Vera Sans Mono, Consolas, Lucida Console, monospace;
|
font-family: Menlo, Monaco, DejaVu Sans Mono, Bitstream Vera Sans Mono, Consolas, Lucida Console, monospace;
|
||||||
|
|
|
@ -370,11 +370,6 @@
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
Ox.parseMarkdown <f> Parses (a tiny subset of) Markdown.
|
Ox.parseMarkdown <f> Parses (a tiny subset of) Markdown.
|
||||||
#\*foo\* -> <em>foo</em>
|
|
||||||
#\*\*foo\*\* -> <strong>foo</strong>
|
|
||||||
#\`foo\` -> <code>foo</code>
|
|
||||||
#\`\`\`foo\`\`\` -> <pre><code>foo</pre></code>
|
|
||||||
#[example](http://example.com "example.com") -> <a href="http://example.com" title="example.com">example</a>
|
|
||||||
> Ox.parseMarkdown('*foo* **bar** `baz` ``back`tick``')
|
> Ox.parseMarkdown('*foo* **bar** `baz` ``back`tick``')
|
||||||
'<em>foo</em> <strong>bar</strong> <code>baz</code> <code>back`tick</code>'
|
'<em>foo</em> <strong>bar</strong> <code>baz</code> <code>back`tick</code>'
|
||||||
> Ox.parseMarkdown('<http://example.com>')
|
> Ox.parseMarkdown('<http://example.com>')
|
||||||
|
@ -409,15 +404,13 @@
|
||||||
function(match, classname, code) {
|
function(match, classname, code) {
|
||||||
return '<pre><code'
|
return '<pre><code'
|
||||||
+ (classname ? ' class="' + classname + '"' : '')
|
+ (classname ? ' class="' + classname + '"' : '')
|
||||||
+ '>' + code.trim().replace(/</g, '<')
|
+ '>' + code.trim() + '\n</code></pre>';
|
||||||
+ '\n</code></pre>';
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.replace(
|
.replace(
|
||||||
/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
|
/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
|
||||||
function(match, prev, backticks, code, next) {
|
function(match, prev, backticks, code, next) {
|
||||||
return prev + '<code>'
|
return prev + '<code>' + code.trim() + '</code>';
|
||||||
+ code.trim().replace(/</g, '<') + '</code>';
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.replace(
|
.replace(
|
||||||
|
|
Loading…
Reference in a new issue