logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 1aaec701bb505b83cea1838e785235a7364d6641
parent: cd252b794e4fc473b1ecece79a51f1f2dc1f0812
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Sun, 11 Mar 2018 14:55:49 +0100

Fix #6715: Make catalan words with the L geminate letter work in hashtags (#6741)


Diffstat:

Mapp/javascript/mastodon/features/compose/containers/warning_container.js2+-
Mapp/models/tag.rb2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/javascript/mastodon/features/compose/containers/warning_container.js b/app/javascript/mastodon/features/compose/containers/warning_container.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { me } from '../../../initial_state'; -const APPROX_HASHTAG_RE = /(?:^|[^\/\)\w])#(\w*[a-zA-Z]\w*)/i; +const APPROX_HASHTAG_RE = /(?:^|[^\/\)\w])#(\w*[a-zA-Z·]\w*)/i; const mapStateToProps = state => ({ needsLockWarning: state.getIn(['compose', 'privacy']) === 'private' && !state.getIn(['accounts', me, 'locked']), diff --git a/app/models/tag.rb b/app/models/tag.rb @@ -12,7 +12,7 @@ class Tag < ApplicationRecord has_and_belongs_to_many :statuses - HASHTAG_NAME_RE = '[[:word:]_]*[[:alpha:]_][[:word:]_]*' + HASHTAG_NAME_RE = '[[:word:]_]*[[:alpha:]_·][[:word:]_]*' HASHTAG_RE = /(?:^|[^\/\)\w])#(#{HASHTAG_NAME_RE})/i validates :name, presence: true, uniqueness: true, format: { with: /\A#{HASHTAG_NAME_RE}\z/i }