Commit Graph

120 Commits

Author SHA1 Message Date
Sam
814c8804d4 correct text highlighting for no highlight 2017-06-23 14:35:46 -04:00
Sam
b7386958ed don't leak state into other tests 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
f1750be2be Fixes woman_shrugging name conversion 2017-06-15 08:26:29 +02:00
Joffrey JAFFEUX
95e1843d33 Improves native emoji conversion 2017-06-14 17:42:52 +02:00
Joffrey JAFFEUX
ab6086bce9 Transforms native skin toned emojis to valid names 2017-06-14 15:35:37 +02:00
Joffrey JAFFEUX
09d34b7642 emoji images are now v5 not v3
TODO: we should not hardcode this
2017-06-05 16:10:36 +02:00
Guo Xiang Tan
3861bd2793 FIX: Quotes should be ignored when parsing for onebox source. 2017-04-11 15:22:21 +08:00
Guo Xiang Tan
0a4c30bce3 FIX: Handle cases where alt and title tag is blank when parsing excerpt. 2017-04-11 14:18:27 +08:00
Guo Xiang Tan
e49f3a408e FEATURE: Add option for ExcerptParser to keep onebox source. 2017-04-10 16:11:58 +08:00
Robin Ward
14410b71fb Convert server side paths to use /u/ 2017-03-30 10:23:24 -04:00
Guo Xiang Tan
6312b8b7e4 Fix failing specs. 2017-03-14 14:58:22 +08:00
Guo Xiang Tan
1a7e954e09 FIX: Store custom emojis as uploads.
* Depending on a hardcoded directory was a flawed design
  which made it impossible to debug when custom emojis go
  missing.
2017-03-14 13:07:18 +08:00
Régis Hanol
ba115480ba FIX: wasn't extracting links to quoted posts 2017-02-06 14:45:04 +01:00
Guo Xiang Tan
1758af9a1d FIX: Perform emoji unescape for topic titles in quotes. 2017-01-11 17:23:13 +08:00
Guo Xiang Tan
f473a119ff Remove unnecessary stub. 2017-01-06 08:53:30 +08:00
Arpit Jalan
2d0c99636a do not add rel noreferrer 2016-11-20 18:19:14 +05:30
Arpit Jalan
7cb76f7333 FIX: add rel noopener and noreferrer in addition to nofollow 2016-11-20 17:07:27 +05:30
Neil Lalonde
86522a52b7 FEATURE: add censored_pattern setting to censor posts using regex 2016-11-08 16:39:26 -05:00
Sam
89daa43754 FEATURE: remap emojis back for push notifications and desktop alerts 2016-10-11 13:03:48 +11:00
Robin Ward
3c12dd6549 FIX: Consider lazyYT divs as links when extracting 2016-09-22 16:50:24 -04:00
Robin Ward
a546395397 REFACTOR: Migrate markdown functionality in ES6 2016-07-11 12:57:05 -04:00
Sam
b15f6bd211 FIX: s3 cdn urls not remapped correctly 2016-06-30 18:58:38 +10:00
James Kiesel
7a6bc3f1d7 Apply notification styles to mailing list email manually (#4283)
* Apply notification styles to mailing list email manually

* Fix failing spec
2016-06-21 20:42:30 +05:30
Sam
e01dc54f2a UX: we should always simply use emoji codes as opposed to treating as image 2016-06-02 12:29:25 +10:00
Neil Lalonde
f13470b96b Use db schema for tags instead of plugin store and custom fields 2016-05-26 14:29:48 -04:00
James Kiesel
feffe23cc5 FEATURE: More granular mailing list mode (#4068)
* Rearrange frontend to account for mailing list mode

* Allow update of user preference for mailing list frequency

* Add mailing list frequency estimate

* Simplify frequency estimate; disable activity summary for mailing list mode

* Remove combined updates

* Add specs for enqueue mailing list mode job

* Write mailing list method for mailer

* Fix linting error

* Account for stale topics

* Add translations for default mailing list setting

* One query for mailing list topics

* Fix failing spec

* WIP

* Flesh out html template

* First pass at text-based mailing list summary

* Add user avatar

* Properly format posts for mailing list

* Move make_all_links_absolute into Email::Styles

* Apply first_seen_at to user

* Send mailing list email summary hourly based on first_seen_at

* Branch and test cleanup

* Use existing mailing list mode estimate

* Fix failing specs
2016-05-21 15:17:54 +02:00
Sam
d25dc126f7 FIX: Post does not save if it contains a tag link 2016-05-02 11:36:09 +10:00
Régis Hanol
1a621f3393 FIX: don't extract links to anchors 2016-04-15 20:02:18 +02:00
Régis Hanol
7acdbc8448 FIX: don't extract links from elided parts 2016-03-16 22:35:08 +01:00
Robin Ward
396713718b FEATURE: Adds ~200 more emoji
This includes all new emoji from Unicode 7 and Unicode 8 with the
exception of skin tones which will require a new interface.
2016-03-04 15:10:14 -05:00
Robin Ward
0167f6bb57 FIX: Don't substitute emojis within code blocks 2016-03-02 14:32:00 -05:00
Robert Riemann
9c39647cd2 fix: support for hyphens in group name
The group mention @ORG-team triggers notifications for the group @ORG. This fix changes the RegExp, so that the group name is correctly extracted.

see: https://meta.discourse.org/t/group-mentions-that-begin-with-the-same-characters-may-be-incorrect/39892/12?u=rriemann
2016-02-23 23:55:31 +01:00
Guo Xiang Tan
a362ad9407 FIX: Emoji in Discourse onebox is wrapped in square brackets. 2016-01-13 19:00:11 +08:00
Robin Ward
74780c1688 Add more server side unicode replacements for emoji 2015-12-30 14:46:52 -05:00
Robin Ward
c064dc1322 FEATURE: Perform a server side replacement of unicode emoji 2015-12-29 16:28:27 -05:00
Jeff Atwood
e03861da7e change all emoji image tests to use ?v=1 2015-12-22 14:36:21 -08:00
Sam Saffron
f97a754b30 Revert "Try adding an ALT tag for avatars" 2015-12-15 19:57:54 +11:00
Sam Saffron
b7f6df7d0c fix specs and tests 2015-12-15 18:18:20 +11:00
Andy Waite
3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Sam
150ad01111 improve UX remove username said if we have a title 2015-09-25 14:18:38 +10:00
Sam
e5234b38b8 FEATURE: add title expansion for off topic quotes 2015-09-25 13:35:14 +10:00
Sam
568adc49c0 FIX: fenced code blocks not hoisted correctly
also fixes unhoisting logic
2015-07-31 17:53:20 +10:00
Guo Xiang Tan
7c1e16da54 FEATURE: Display emojis in user stream. 2015-07-23 23:50:01 +08:00
Sam
4c92f05d8d more tests 2015-07-20 17:06:00 +10:00
Sam
ecf50a741c strip classes from table instead of ignoring table 2015-07-20 17:05:24 +10:00
Sam
e93665b9f7 FEATURE: site setting to allow html tables (which may come from imports)
(allow_html_tables , disabled by default)
2015-07-20 16:56:46 +10:00
Robin Ward
b52e5d1536 FIX: default_avatars wasn't being used for some server side templates 2015-06-26 13:38:09 -04:00
Sam Saffron
b7a0a295c0 FIX: s3 cdn would break cooking if <img> tag had no src 2015-06-10 19:28:21 +10:00
Sam
93ab03966e FIX: no-follow not handled correctly for sub domains
if a.com was whitelisted aa.com would pass through
2015-05-27 14:31:01 +10:00