mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Remove leading # when creating tag
- Remove leading # from tags that are created with leading # - Convenience method for users who tend to type them, but did not want a tag with double # - If a user wants a tag with a leading #, then can double it (ie: ##OfPeople)
This commit is contained in:
@@ -64,7 +64,8 @@ class TagSelect extends React.Component {
|
||||
submitTag () {
|
||||
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_TAG')
|
||||
let { value } = this.props
|
||||
const newTag = this.refs.newTag.value.trim().replace(/ +/g, '_')
|
||||
let newTag = this.refs.newTag.value.trim().replace(/ +/g, '_')
|
||||
newTag = newTag.charAt(0) === '#' ? newTag.substring(1) : newTag
|
||||
|
||||
if (newTag.length <= 0) {
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user