44 Commits

Author SHA1 Message Date
Ben McCann
4afb228d95
fix: Convert to ESM (#2227)
BREAKING CHANGE:

- Default export removed. Use `import { marked } from 'marked'` or `const { marked } = require('marked')` instead.
- `/lib/marked.js` removed. Use `/marked.min.js` in script tag instead.
- When using marked in a script tag use `marked.parse(...)` instead of `marked(...)`
2021-11-02 09:32:17 -05:00
Tony Brix
2da5885989
fix: walkTokens uses marked as this (#2251) 2021-10-24 00:03:59 -05:00
Tony Brix
9c312b2cb1
chore(docs): fix extension docs indentation (#2178) 2021-08-22 18:57:14 -05:00
Trevor Buckner
288f1cbe2f
Tokenizers lex their own child tokens (#2124)
BREAKING CHANGES:

- Tokenizers will create their own tokens with `this.lexer.inline(text, tokens)`. The `inline` function will queue the token creation until after all block tokens are rendered.
- `nptable` tokenizer is removed and merged with `table` tokenizer.
- Extensions tokenizer `this` object will include the `lexer` as a property. `this.inlineTokens` becomes `this.lexer.inline`.
- Extensions parser `this` object will include the `parser` as a property. `this.parseInline` becomes `this.parser.parseInline`.
- `tag` and `inlineText` tokenizer function signatures have changed.
2021-08-02 14:12:43 -05:00
Tony Brix
da1c57f74c
chore(docs): add extensions link to nav links (#2105) 2021-06-16 09:55:06 -05:00
Trevor Buckner
5be9d6d70e
feat: Custom Tokenizer/Renderer extensions (#2043)
Co-authored-by: Tony Brix <tony@brix.ninja>
2021-06-15 18:22:00 -05:00
Ulisse mini
29dbc21d20
docs: warn about broken inline latex example (#1949)
The docs don't mention how the latex example won't actually work with inline latex, ie. `foo $bar$ baz`
2021-02-19 10:04:41 -06:00
Tony Brix
3ad3b10fb1
docs: update inline tokenizer docs with emStrong (#1928) 2021-02-07 20:26:57 -06:00
Trevor Buckner
f848e77039
fix: Join adjacent inlineText tokens (#1926) 2021-02-07 16:22:47 -06:00
Steven
010c95f090 Use cleanUrls 2020-08-29 17:55:07 -04:00
Steven
6789214c5c Fix links to other documents 2020-08-15 19:35:00 -04:00
Callum
0c415fd82e
update docs example to be clearer
Co-authored-by: Steven <steven@ceriously.com>
2020-07-15 08:02:55 +01:00
flouc001
710658cb61 use options param, update docs, update tests 2020-07-12 19:38:37 +01:00
flouc001
2290f677c9 update docs 2020-07-11 09:36:24 +01:00
Tony Brix
acc84eb6a0 add walkTokens to docs 2020-05-12 19:57:28 -05:00
Tony Brix
9721105c3f update docs 2020-04-23 23:36:54 -05:00
Tony Brix
d5de6af1f6 add marked.use section to docs 2020-04-20 10:50:09 -05:00
Tony Brix
1050460737
Fix docs 2020-04-19 01:38:41 -05:00
Tony Brix
07f2b334f0 return false to use last renderer/tokenizer 2020-04-19 01:08:54 -05:00
Tony Brix
07510c9301 update docs with marked.use 2020-04-19 00:38:19 -05:00
Tony Brix
b767ede031 Merge branch 'tokenizer' of https://github.com/UziTech/marked into tokenizer 2020-04-15 00:04:09 -05:00
Tony Brix
dfbb0161f8 fix docs 2020-04-15 00:02:18 -05:00
Tony Brix
4aecab365e
Update docs/USING_PRO.md
Co-Authored-By: Steven <steven@ceriously.com>
2020-04-14 19:52:44 -05:00
Tony Brix
dd8e549087 add mangle smartypants examples 2020-04-14 16:53:06 -05:00
Tony Brix
0f0586094b fix example 2020-04-14 16:43:02 -05:00
Tony Brix
1f5a621dab spelling 2020-04-14 16:40:39 -05:00
Tony Brix
4117ba271f move smartypants, mangle, and rules to lexer 2020-04-14 16:40:06 -05:00
Tony Brix
4947ce5078 only send needed variables to tokenizer 2020-04-14 13:29:51 -05:00
Tony Brix
f5d67a5ea3 fix typo 2020-04-08 13:06:13 -05:00
Tony Brix
b63156f938 update docs 2020-04-08 13:04:38 -05:00
Tony Brix
77838e708e update docs 2020-04-02 01:05:04 -05:00
Tony Brix
a82d1c6077 update docs 2020-04-02 00:24:21 -05:00
Tony Brix
32d61f4668 update docs 2019-11-06 16:03:39 -06:00
Tony Brix
e3bb190265 update examples with es6+ 2019-07-08 09:13:53 -05:00
x13machine
7de5376276
Update list item documentation 2019-03-08 17:28:01 -06:00
Yutaka Omido
c3cc6a2daf update document about extending renderer 2019-02-13 14:42:33 +09:00
Yanick Champoux
89bafb851a
typo: re*s*ponsibility 2018-10-25 13:55:40 -04:00
Steven
6c2b90fdd6 Improve navbar 2018-08-03 16:40:30 -04:00
Kyo Nagashima
007756e7e7
Add missing parameters for renderer methods
Some renderer methods have more parameters than documented. Let’s update them.
2018-07-29 00:20:04 +09:00
Vse Mozhet Byt
bf5b83c847 Document mutability of tokens argument in parser 2018-03-28 04:01:34 +03:00
Steven
7c17d3127a
Merge pull request #1175 from vsemozhetbyt/doc-using-pro-duplicate
Remove duplicate part in docs/USING_PRO.md
2018-03-27 19:37:49 -04:00
Vse Mozhet Byt
0b6a240ebb Remove duplicate part in docs/USING_PRO.md 2018-03-28 00:54:11 +03:00
Vse Mozhet Byt
e93bfb3fc2 Fix nits in code example in USING_PRO.md
* Rename undefined variable.
* Delete unneeded quotes.
* Fix alignment in the actual output from the code example
  and make it more close to the "Output:" example
  (otherwise, the indentation of the "<h1>" line will be out of order).
2018-03-27 23:38:03 +03:00
Steven
94b8b3e1b1 Move existing docs to /docs dir 2018-03-11 17:16:48 -04:00