]> git.openstreetmap.org Git - rails.git/commit
Allow word separator to consist of multiple spaces
authorAnton Khorev <tony29@yandex.ru>
Sat, 31 May 2025 15:53:10 +0000 (18:53 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sat, 31 May 2025 15:53:10 +0000 (18:53 +0300)
commit3cba2a6cf100bb9c9ec1c5e1dedf0e7eb66e46a3
treea191d196693ebb1f0ad257832ab4c74aa25341f9
parent7d9a45f33acc0bb75ecdecdb493e90507622da2f
Allow word separator to consist of multiple spaces

Uses negative lookbehind regexp, because .truncate calls .rindex. See ruby String#rindex method for details:

https://ruby-doc.org/3.2.6/String.html#method-i-rindex
lib/rich_text.rb
test/lib/rich_text_test.rb