Commit Graph

25 Commits

Author SHA1 Message Date
OsamaSayegh
f13a7226db FIX: display tables in posts history diff (#6032) 2018-07-12 14:13:52 +10:00
Joffrey JAFFEUX
03a7d532cf
DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
Sam
60ee9a4ccf make tests a bit happier 2018-02-01 15:56:22 +11:00
Sam
ee0d3f15c1 FEATURE: allow better fidelity for auto linkify, disable most tlds based linkify
New site settings:

enable_markdown_linkify: which is default on, auto links https:// and http:// and mail://

markdown_linkify_tlds: which allows control of what tlds get autolinked for cases such as www.site.com, default is com|net|gov
2018-02-01 13:22:38 +11:00
Sam
a9e2fc59c4 FIX: [constructor] bbcode would cause markdown crash 2017-12-27 16:11:30 +11:00
David Taylor
27539e15e1 Allow whitespace around % scaler in markdown image syntax (#5000) 2017-07-26 10:54:20 -04:00
Sam
e1ce47a901 Pass the full CommonMark spec 2017-07-21 13:20:52 -04:00
Sam
8921058c67 FIX: medium URL with @ incorrectly handled as mention
Also:

- remove unused code
- rename bbcode_ruler to bbcode.ruler
- add md.core.textPostProcess.ruler to apply at end of chain (excluding links)
2017-07-17 17:44:48 -04:00
Sam Saffron
d0c5205a52 Feature: Change markdown engine to markdown it
This commit removes the old evilstreak markdownjs engine.

- Adds specs to WhiteLister and changes it to stop using globals
    (Fixes large memory leak)
- Fixes edge cases around bbcode handling
- Removes mdtest which is no longer valid (to be replaced with
    CommonMark)
- Updates MiniRacer to correct minor unmanaged memory leak
- Fixes plugin specs
2017-07-17 11:41:34 -04:00
Sam
79a084dd58 Revert "remove old markdown engine work-in-progress"
This reverts commit ee470b5317.
2017-07-12 18:10:51 -04:00
Sam
bcbb9f208d Revert "Integrate new engine, correct old specs"
This reverts commit f1b38ba4fb.
2017-07-12 18:10:07 -04:00
Sam
f1b38ba4fb Integrate new engine, correct old specs
corrects edge cases with

- full quotes
- [url] with nested tags
- engine overrides
- onebox applying to non http srcs
2017-07-12 17:44:40 -04:00
Sam Saffron
ee470b5317 remove old markdown engine work-in-progress 2017-07-12 17:44:40 -04:00
Sam
98e03b04b5 Don't depend on imports for md extensions 2017-07-11 16:48:25 -04:00
Sam
3f950a756a FEATURE: support image dimensions via Markdown image 2017-07-11 12:13:03 -04:00
Robin Ward
754c1e5438 Upgrade to Babel 6 2017-07-05 15:25:23 -04:00
Sam
d2ba543ed3 correct case where %20 decoded as space in auto link
correct case where onebox is not applied when url is decoded
2017-07-03 16:32:53 -04:00
Sam
0650c8dbab optimize rule lookup
we have tons of bbcode rules, might as well speed them up
2017-06-30 15:19:16 -04:00
Sam
4c5109ff5b FEATURE: site setting for Markdown typographer
It ships anyway with markdown.it so we might as well expose it
2017-06-27 16:50:13 -04:00
Sam
8967d50dc2 Clean up sanitization code
- remove html table test, this is soon to be deprecated
- move sanitization tests into pretty text.rb
- fix up whitelister so it makes a copy of options
2017-06-26 15:21:47 -04:00
Sam
e9f55adb3a FEATURE: add table support 2017-06-26 13:25:05 -04:00
Sam
df5ee0cfc1 correct onebox rendering so it fills in cached
the onebox plugin needs to pull in the actual cached onebox
and bypass the whitelister for onebox content
2017-06-26 13:09:58 -04:00
Sam
da5ccd2000 correctly hunt for console.log 2017-06-23 15:24:20 -04:00
Sam
05e5a740a6 FEATURE: consistent bbcode inline and block rulers 2017-06-23 12:01:33 -04:00
Sam
234694b50f Feature: CommonMark support
This adds the markdown.it engine to Discourse.
https://github.com/markdown-it/markdown-it

As the migration is going to take a while the new engine is default
disabled. To enable it you must change the hidden site setting:
enable_experimental_markdown_it.

This commit is a squash of many other commits, it also includes some
improvements to autospec (ability to run plugins), and a dev dependency
on the og gem for html normalization.
2017-06-23 12:01:33 -04:00