Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed braces in other files

  • Loading branch information...
commit d93a208bca94a35fcee374dc171b9e06c1139547 1 parent 70045d6
@Buildstarted Buildstarted authored
Showing with 10 additions and 5 deletions.
  1. +2 −1  JabbR/Hubs/Chat.cs
  2. +8 −4 JabbR/Infrastructure/TextTransform.cs
View
3  JabbR/Hubs/Chat.cs
@@ -124,7 +124,8 @@ public void Send(string content)
ProcessUrls(links, room, chatMessage);
}
- private string ParseChatMessageText(string content, out HashSet<string> links) {
+ private string ParseChatMessageText(string content, out HashSet<string> links)
+ {
TextTransform textTransform = new TextTransform(this._repository);
string message = textTransform.Parse(content);
return Transform(message, out links);
View
12 JabbR/Infrastructure/TextTransform.cs
@@ -8,19 +8,23 @@
namespace JabbR.Infrastructure {
- public class TextTransform {
+ public class TextTransform
+ {
private readonly IJabbrRepository _repository;
public const string HashTagPattern = @"(?:(?<=\s)|^)#(\w*[A-Za-z_]+\w*)";
- public TextTransform(IJabbrRepository repository) {
+ public TextTransform(IJabbrRepository repository)
+ {
this._repository = repository;
}
- public string Parse(string message) {
+ public string Parse(string message)
+ {
return ConvertHashtagsToRoomLinks(message);
}
- private string ConvertHashtagsToRoomLinks(string message) {
+ private string ConvertHashtagsToRoomLinks(string message)
+ {
message = Regex.Replace(message, HashTagPattern, m => {
string roomName = m.Groups[1].Value; /* hashtag without #*/
Please sign in to comment.
Something went wrong with that request. Please try again.