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-size: 11px;
|
||||
}
|
||||
.OxSourceViewer td.OxComment > pre > code {
|
||||
.OxSourceViewer td.OxComment > pre {
|
||||
line-height: 16px;
|
||||
margin: 4px 0 4px 0;
|
||||
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.
|
||||
#\*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``')
|
||||
'<em>foo</em> <strong>bar</strong> <code>baz</code> <code>back`tick</code>'
|
||||
> Ox.parseMarkdown('<http://example.com>')
|
||||
|
@ -409,15 +404,13 @@
|
|||
function(match, classname, code) {
|
||||
return '<pre><code'
|
||||
+ (classname ? ' class="' + classname + '"' : '')
|
||||
+ '>' + code.trim().replace(/</g, '<')
|
||||
+ '\n</code></pre>';
|
||||
+ '>' + code.trim() + '\n</code></pre>';
|
||||
}
|
||||
)
|
||||
.replace(
|
||||
/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
|
||||
function(match, prev, backticks, code, next) {
|
||||
return prev + '<code>'
|
||||
+ code.trim().replace(/</g, '<') + '</code>';
|
||||
return prev + '<code>' + code.trim() + '</code>';
|
||||
}
|
||||
)
|
||||
.replace(
|
||||
|
|
Loading…
Reference in a new issue