Commit Graph

86 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
6de258d4cf FEATURE: Introduces new emoji-picker 2017-07-19 16:48:23 +02:00
Sam
c7b0764089 correct more edge cases with new engine 2017-07-17 17:44:48 -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
d609f8a53c Revert "correct more specs"
This reverts commit 40bcc6bbdc.
2017-07-12 18:10:05 -04:00
Sam
40bcc6bbdc correct more specs 2017-07-12 17:44:40 -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
5d139e461c FIX: multi option poll not working (new engine) 2017-07-11 14:43:34 -04:00
Sam
3f950a756a FEATURE: support image dimensions via Markdown image 2017-07-11 12:13:03 -04:00
Sam
ba9898c5a9 FIX: smarter newline handling for <img> tags on line alone
Run all of pretty text spec on new engine
2017-07-10 12:22:15 -04:00
Sam
9fb180f839 we don't want that console.log 2017-07-07 16:38:52 -04:00
Sam
6f09df0deb FIX: don't create tags autolinks inside links (new engine) 2017-07-07 13:04:25 -04:00
Sam
436b894f7a FIX: mention not working after a newline (new engine) 2017-07-07 11:06:50 -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
a55e679563 support wrap function in bbcode rules 2017-06-30 12:21:01 -04:00
Sam
ca40c1725c add support for a wrap function in bbcode replace 2017-06-29 16:43:57 -04:00
Sam
d941ed90d6 support for bbcode [code] blocks 2017-06-29 16:04:10 -04:00
Sam
de50d8cd35 Support for [email] [url] [img] bbcodes 2017-06-29 14:00:09 -04:00
Sam
c6b83f4714 Correct logic so hashtags are properly ignored in links 2017-06-29 12:48:20 -04:00
Sam
0e391a72a1 use custom whitelister for tables 2017-06-28 16:08:29 -04:00
Sam
6200d7d6ab correct bug where only a single poll per topic worked 2017-06-28 15:36:19 -04:00
Sam
cfbda863e8 implement unicode emoji replacements 2017-06-28 13:47:30 -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
0d62420cbe Space prior to onebox stops onebox resolution 2017-06-27 16:16:17 -04:00
Sam
232de90607 explicit autolink should not be oneboxed 2017-06-27 15:34:16 -04:00
Sam
0e0092d738 corrected a parsing edge cases for bbcode blocks 2017-06-27 10:07:06 -04:00
Sam
21f7ac1f25 correct spec, require closing tag for bbcode blocks 2017-06-26 16:51:55 -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
81eb3218b2 FEATURE: used strict sanitizer by default
This amends it so sanitize always uses the most strict sanitizer
by default, if it needs to be "widened" to use more options then
you need to pass it more options.
2017-06-26 11:27:30 -04:00
Sam
da5ccd2000 correctly hunt for console.log 2017-06-23 15:24:20 -04:00
Sam
814c8804d4 correct text highlighting for no highlight 2017-06-23 14:35:46 -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
Joffrey JAFFEUX
353d059133 Explains sort/reverse of emoji replacements 2017-06-14 17:54:52 +02:00
Joffrey JAFFEUX
95e1843d33 Improves native emoji conversion 2017-06-14 17:42:52 +02:00
Sam
826f332766 Merge pull request #4901 from jjaffeux/emoji-5.0
Emoji next
2017-06-13 11:12:41 -04:00
Robin Ward
bd70656b90 FIX: Oneboxing root domains could stop previewing 2017-06-12 12:13:29 -04:00
Joffrey JAFFEUX
ba07ae67fb prefer const over let 2017-06-05 14:35:27 +02:00
Joffrey JAFFEUX
f8e5cbd81a prefer const when not reasigned 2017-06-05 14:33:52 +02:00
Joffrey JAFFEUX
64336a8c75 Emoji 5.0 support 2017-06-05 14:06:23 +02:00
Robin Ward
0829671963 FIX: Nested quotes weren't rendered properly with BBCode 2017-04-03 14:38:30 -04:00
Robin Ward
45a257815a Convert front end paths from /users/ to /u/ 2017-03-30 10:23:24 -04:00