Commit Graph

15 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
fd15562939
FIX: allows to use open attribute with details (#29116)
Supporting `open` allows to show a `details` block open by default.

Usage:

```
[details open]
my visible content
[/details]
```
2024-10-08 11:13:44 +09:00
Régis Hanol
d4af30f26d FIX: elided content in email should always have an href
Not 100% sure why the changes in `PrettyText.format_for_email` raised this issue, but we were missing adding a link to the Discourse instance whenever we are replacing the elided part of a post with a link to either the post or the Discourse instance in the email.

Also reformated the specs using better variable names (sometimes a variable named `md` would contain some html) and used the `match_html` helper for all the tests.
2024-05-22 15:38:18 +02:00
Jarek Radosz
4c860995e0
DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
David Taylor
055310cea4
DEV: Apply syntax_tree formatting to plugins/* 2023-01-07 11:11:37 +00:00
Phil Pirozhkov
493d437e79
Add RSpec 4 compatibility (#17652)
* Remove outdated option

04078317ba

* Use the non-globally exposed RSpec syntax

https://github.com/rspec/rspec-core/pull/2803

* Use the non-globally exposed RSpec syntax, cont

https://github.com/rspec/rspec-core/pull/2803

* Comply to strict predicate matchers

See:
 - https://github.com/rspec/rspec-expectations/pull/1195
 - https://github.com/rspec/rspec-expectations/pull/1196
 - https://github.com/rspec/rspec-expectations/pull/1277
2022-07-28 10:27:38 +08:00
Jarek Radosz
2fc70c5572
DEV: Correctly tag heredocs (#16061)
This allows text editors to use correct syntax coloring for the heredoc sections.

Heredoc tag names we use:

languages: SQL, JS, RUBY, LUA, HTML, CSS, SCSS, SH, HBS, XML, YAML/YML, MF, ICS
other: MD, TEXT/TXT, RAW, EMAIL
2022-02-28 20:50:55 +01:00
Kane York
919c87a9ce
FIX: Get only the correct collapse title in emails (#10228)
Previously, this would get every details block title from the entire post, for every details block.
2020-07-13 18:49:36 -07:00
Krzysztof Kotlarek
9bff0882c3
FEATURE: Nokogumbo (#9577)
* FEATURE: Nokogumbo

Use Nokogumbo HTML parser.
2020-05-05 13:46:57 +10:00
Bianca Nenciu
463db22928 DEV: Add test.
Follow-up to bccd090ced.
2019-06-26 16:37:01 +03:00
Bianca Nenciu
3a1d99577e FIX: Replace details content with instruction. 2019-05-29 08:36:04 +08:00
Sam Saffron
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Régis Hanol
3b06e5502b FIX: ensure we never send elided content via email 2018-02-08 00:01:11 +01:00
Sam
660d5e0a35 fix broken spec 2017-07-18 14:44:49 -04:00
Guo Xiang Tan
1b986f2266 Fix the build. 2016-07-20 14:11:10 +08:00
Régis Hanol
d9d758aeeb add pretty-text tests for discourse-details plugin 2016-07-11 12:57:05 -04:00