Orca
d07d585b6b
docs: replace .js with .mjs in links to files in ndoc comments ( #989 )
11 months ago
Alex Kocharin
d9885bad6e
Render html tags inside img alt as their original text ( #979 )
Spec is not clear on how to handle this. Three variations exist:
```
$ echo '![text <textarea> text](image.png)' | /home/user/commonmark.js/bin/commonmark
<p><img src="image.png" alt="text <textarea> text" /></p>
$ echo '![text <textarea> text](image.png)' | /home/user/cmark/build/src/cmark
<p><img src="image.png" alt="text <textarea> text" /></p>
$ echo '![text <textarea> text](image.png)' | /home/user/.local/bin/commonmark
<p><img src="image.png" alt="text text" /></p>
```
Prior to this commit:
- when HTML tags are enabled, tags were removed (as in Haskell version)
- when HTML tags are disabled, tags were escaped (as in C version)
After this commit:
- tags will be escaped (as in C version) regardless of HTML flag
+ render hardbreaks as newlines, same as cmark
12 months ago
Vitaly Puzrin
8b815a6072
lint: reduce empty lines
12 months ago
Vitaly Puzrin
efc714f702
standard: more tweaks & simplify eslint config
12 months ago
Vitaly Puzrin
94177fca70
standard: spaces in comments
12 months ago
Vitaly Puzrin
7dfcf69b71
standard: no spaces near array brackets
12 months ago
Vitaly Puzrin
0eb4cb96a4
standard: space before function params
12 months ago
Vitaly Puzrin
d0219010ad
standard: remove semi
12 months ago
Vitaly Puzrin
88b8669c46
var => const, let
12 months ago
Vitaly Puzrin
e92e776411
Rewrite core to es6 modules
1 year ago
Alex Kocharin
6325878f9f
Multiple refactors
removed unused and duplicated variables
3 years ago
Himanshu Mehta
e07a9ddeee
typo fix
3 years ago
Taneli Hukkinen
272a470ed2
Fix newline not rendered in image alt attribute
4 years ago
Vitaly Puzrin
c9949dd585
Avoid fenced token mutation, #745
4 years ago
Alex Kocharin
866fba34a2
Add lang str remainder to highlight callback
``` javascript {line-numbers=5 highlight=14-17}
test
```
This markup now calls `highlight` like this:
require('markdown-it')({
highlight(code, lang, attrs) {
assert(code === 'test')
assert(lang === 'javascript')
assert(attrs === '{line-numbers=5 highlight=14-17}')
}
})
close https://github.com/markdown-it/markdown-it/issues/626
close https://github.com/markdown-it/markdown-it/pull/706
4 years ago
Cyril Auburtin
3e048188c0
typo
7 years ago
Zanin Andrea
b7dd15fa9c
typo correction
7 years ago
arve0
e9306a572c
fence renderer: fix concat of class array
Before:
<pre c="l"><code>...
Now:
<pre class="someClass language-python><code>...
Bug introduced in b7c868b64b
8 years ago
arve0
4c4b66bd57
code renderer: do not render double space before attrs
renderAttrs already adds a space before attributes
Before:
<code class="language-python">for i in range(10):</code>
Now:
<code class="language-python">for i in range(10):</code>
8 years ago
Vitaly Puzrin
5cd9007edf
Render `code_inline` & `code_block` attributes if exist, #261
9 years ago
Vitaly Puzrin
b7c868b64b
Renderer: token stream should stay immutable, close #260
9 years ago
Christopher Breeden
a2b7b8e156
Fixes #246 , HTML Escaping alt-tag twice.
9 years ago
Vitaly Puzrin
87ece24ff9
Allow full content override from highlighter
9 years ago
Vitaly Puzrin
d196089874
.attrPush() -> .attrJoin() in fenced block renderer
9 years ago
Vitaly Puzrin
bf424c8a49
deps update, configs & code cleanup
9 years ago
Alex Kocharin
019bbda5f5
Fix class injection in fence renderer
Close https://github.com/markdown-it/markdown-it/issues/128
10 years ago
Vitaly Puzrin
45773e223d
Renderer cleanup
10 years ago
Vitaly Puzrin
917f5dee32
Attrs renderer signature change
10 years ago
Vitaly Puzrin
00117cb2e7
Changes to improve speed on node 0.12 & iojs
10 years ago
Vitaly Puzrin
3730820945
Added token helpers & reorganized renderer
10 years ago
Alex Kocharin
bb4dcf48f4
Set token.markup whereever appropriate
10 years ago
Alex Kocharin
4aabd5592e
Use a common class for tokens
10 years ago
Alex Kocharin
4f6e8d4830
Improve replaceEntities handling
1. Use unescapeAll instead of replaceEntities(unescapeMd(...))
2. Move replaceEntities(title) out of the renderer.
10 years ago
Vitaly Puzrin
9a7584f4a7
removed unused code
10 years ago
Vitaly Puzrin
0c7086f51f
changelog & apidoc update
10 years ago
Vitaly Puzrin
fe04849911
Reformattted renderer fns - more compact
10 years ago
Vitaly Puzrin
2090fd4998
del -> strikethrough
10 years ago
Vitaly Puzrin
90e5a9c9cc
Bulk rules rename (unify)
10 years ago
Vitaly Puzrin
26ee0a6252
Removed deflist rule (move to plugin)
10 years ago
Vitaly Puzrin
57d56c43fb
Removed footnote rules (move to plugin)
10 years ago
Vitaly Puzrin
c0ccaa79ce
Removed abbr rules (move to plugin)
10 years ago
Vitaly Puzrin
04ee60d3c4
Removed unused code & improved tests coverage for some rules.
10 years ago
Vitaly Puzrin
d5f43dd9b6
Dropped custom fences support - overcomplication
10 years ago
Vitaly Puzrin
814f85af96
Fixed sub-sup tokens format. Closes #21
10 years ago
Vitaly Puzrin
56001200c0
Added link target attribute support for plugins
10 years ago
Vitaly Puzrin
c6807cf2b4
Fixed line breaks in deflist
10 years ago
Vitaly Puzrin
96402b5e7b
apidoc: docs update + Renderer info
10 years ago
Alex Kocharin
d7221761fb
Render image labels as text
10 years ago
Vitaly Puzrin
2a9218cf60
Updated line breaks rendering logic
10 years ago
Vitaly Puzrin
8a67cb3a83
Do browserified output ascii-friendly
10 years ago