Bug #1033 fix
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@119827 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6218f71e6f
commit
c296d54710
|
@ -28,7 +28,6 @@ import org.gcube.contentmanagement.blobstorage.service.IClient;
|
||||||
import org.gcube.contentmanager.storageclient.wrapper.AccessType;
|
import org.gcube.contentmanager.storageclient.wrapper.AccessType;
|
||||||
import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
|
import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
|
||||||
import org.gcube.contentmanager.storageclient.wrapper.StorageClient;
|
import org.gcube.contentmanager.storageclient.wrapper.StorageClient;
|
||||||
import org.gcube.portal.custom.communitymanager.OrganizationManager;
|
|
||||||
import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
|
import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
|
||||||
import org.gcube.portal.custom.communitymanager.impl.OrganizationManagerImpl;
|
import org.gcube.portal.custom.communitymanager.impl.OrganizationManagerImpl;
|
||||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||||
|
|
|
@ -78,10 +78,10 @@ public class TextTransfromUtils {
|
||||||
*/
|
*/
|
||||||
protected static List<String> getHashTags(String postText) {
|
protected static List<String> getHashTags(String postText) {
|
||||||
List<String> hashtags = new ArrayList<>();
|
List<String> hashtags = new ArrayList<>();
|
||||||
Pattern MY_PATTERN = Pattern.compile("#(\\w+)");
|
Pattern MY_PATTERN = Pattern.compile("^#\\w+|\\s#\\w+");
|
||||||
Matcher matcher = MY_PATTERN.matcher(postText);
|
Matcher matcher = MY_PATTERN.matcher(postText);
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
hashtags.add("#"+matcher.group(1));
|
hashtags.add("#"+matcher.group().replace(" ", "").replace("#", ""));
|
||||||
}
|
}
|
||||||
return hashtags;
|
return hashtags;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue