Commit f4a6003b authored by Ben Hayward's avatar Ben Hayward

Syntax

1 merge request!574[Sprint/OwlfashionedOwl](fix): Limit hashtag remind #1927
Pipeline #85022623 failed with stages
in 13 minutes and 1 second
......@@ -111,21 +111,4 @@ export class HashtagsSelectorModalComponent {
this._opts.onSelected();
}
}
/**
* Gets a list of all hashtags in a given string.
* @input {string} inputText - The text to be searched.
* @returns {Array<string>} - array of each hashtag (as a string).
* Credit to Arnaud Valensi - http://geekcoder.org/js-extract-hashtags-from-text/
*/
sliceHashTags(inputText: any) {
const regex = /(?:^|\s)(?:#)([a-zA-Z\d]+)/gm;
let matches = [];
let match;
while ((match = regex.exec(inputText))) {
matches.push(match[1]);
}
return matches;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment