Commit Graph

21 Commits

Author SHA1 Message Date
David Taylor 6417173082
DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
Rafael dos Santos Silva 90411540c7
FIX: Use correct Regexp flag to ignore case (#19184)
Ruby 3.2 started enforcing valid string flags in Regexp constructor.
2022-11-25 10:56:59 -03:00
Gerhard Schlager 332ae97555
FEATURE: Correctly convert topic title to uppercase and lowercase for Turkish default locale (#13115) 2021-05-24 18:13:30 +10:00
Josh Soref 59097b207f
DEV: Correct typos and spelling mistakes (#12812)
Over the years we accrued many spelling mistakes in the code base. 

This PR attempts to fix spelling mistakes and typos in all areas of the code that are extremely safe to change 

- comments
- test descriptions
- other low risk areas
2021-05-21 11:43:47 +10:00
Gerhard Schlager b788948985 FEATURE: English locale with international date formats
Makes en_US the new default locale
2019-05-20 13:47:20 +02:00
Sam Saffron 0a5a6dfded DEV: stop mutating inputs as a side effect
We had quite a few cases in core where inputs are being mutated as a side
effect of calling a method.

This handles all the cases where specs caught this.

Mutating inputs makes code harder to reason about. Eg:

```
frog = "frog"
jump(frog)
puts frog
"fly" # ?????
```

This commit is part of a followup commit that adds # frozen_string_literal
to all our specs.
2019-04-30 10:25:53 +10:00
Maja Komel 3d9981ac5c FIX: strip invalid byte sequences 2019-02-26 10:09:51 +01:00
Rishabh eacbe28f55 FIX: Skip gsub for normalizing whitespaces when text is nil (#6631) 2018-11-20 09:12:32 +01:00
Gerhard Schlager 4881fb028f FIX: allow_uppercase_posts didn't work for topic titles 2018-10-08 23:50:06 +02:00
Arpit Jalan a4bc54a686 FIX: strip zero width spaces from topic title 2018-02-21 00:12:39 +05:30
Rafael dos Santos Silva 5324c9817f FIX: Title prettify shoundn't downcase all non-ascii titles 2017-08-08 14:03:24 -03:00
Rafael dos Santos Silva fd87f59bbb Test for existing title 2016-03-21 23:06:39 -03:00
Rafael dos Santos Silva adae5d78f5 Rewrite capitalize for readability
Makes capitalize logic more clear with @sam suggestion
2016-03-20 08:35:48 -04:00
Rafael dos Santos Silva decb744c76 Fix capitalize 2016-03-10 00:44:44 -03:00
Rafael dos Santos Silva 3e6ae45a93 Handle Capitalize too
Handles capitalize too, using the same lib
2016-03-07 22:09:30 -03:00
Rafael dos Santos Silva 71b026bc01 FIX: Properly downcase unicode chars
Fix to https://meta.discourse.org/t/title-prettify-does-not-correctly-lowercase-non-english-characters-when-removing-all-caps/16645

This adds a dependency on Active Support Multibyte to downcase on other languages.
2016-03-07 17:07:36 -03:00
Sam 58c95f64d2 FIX: stop stripping zero-width-whitespace
This char is used for formatting khmer words
2015-03-27 13:03:24 +11:00
Régis Hanol f4208ae83f FEATURE: normalize whitespaces in topic title/post content 2014-08-12 00:01:58 +02:00
Konrad Borowski 8bc4264c98 Thread title fixer should ignore special cases like iLetter 2013-05-23 21:31:08 +02:00
Régis Hanol e76f629df8 Text Cleaner now removes all periods from the end of the title 2013-04-18 00:19:42 +02:00
Régis Hanol c5cf8be864 auto replace rules in titles 2013-04-10 11:00:50 +02:00