* fix: Support escapes within emphasis
...particularly right at the end.
Fixes#2280
* chore: realign comments with regexp alternatives
* test: Add HTML test for escapes within emphasis
* fix: Correct recognition and masking of escaped emphasis punctuation
* fix: Correct backslash fake-lookbehind
* fix: non leading-tabs in markdown content (#1559)
Only replaces tabs at the beginning of a block construct. Tabs in the
middle of the item are unaffected.
All tests passing. Tabs in both GFM and CommonMark at 100%
fixes#1559
* update new/html_comments.html to preserve tab
* combine redundant if condition
* add test for tab immediately after blockquote character
Just a small tweak so `emStrong` regex doesn't have to check character-by-character. Try to consume everything up to the delimiter we are checking for.
* fix: gfm table requires leading empty line
* test(gfm/table): add some test cases
* revert changes to `gfm.0.29.json`
* test(gfm/table): add `table_following_text` testcase
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(...)`
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.
Cannot use **(WhiteSpace)(WhiteSpace)(Return)** to break line while only one characher before it.
And if use special character, it will reset the character count
brought by [#1460](https://github.com/markedjs/marked/pull/1460)
Beginning and End delimiters for EM and Strong must be searched in a separate regex to work without lookbehinds. This invalidates the regex that skips over blocks (code, html, etc.) that take precedence over EM or Strong blocks.
Getting around this means we must now mask not only reflinks, but all enclosed blocks which were previously just skipped over in the Regex.
Add one check for overlapping Strong block when testing EM, now passes Commonmark 390 and 471