Permalink
Browse files

Sectioning

  • Loading branch information...
1 parent 8c59060 commit a88fe3b0e33f439d5ac8618edce9d2497627de4d Mikael Roos committed Feb 14, 2012
Showing with 11 additions and 8 deletions.
  1. +11 −8 README.md
View
@@ -32,7 +32,17 @@ FlowdockText.extractUrlsWithIndices("hello http://www.example.com");
[ { url: 'http://www.example.com', indices: [ 6, 28 ] } ]
```
-Parse and process tags from a message
+### Linkification
+
+```javascript
+FlowdockText.autoLink("hello @Username #greets");
+'hello <a title="Search @Username" class="app-tag-link" href="#flowser/all/@Username">@Username</a> <a href="#flowser/all/greets" title="#greets" class="app-tag-link">#greets</a>'
+```
+
+### Parsing all tags from new messages
+
+If you need to replicate the functionality that Flowdock uses to parse tags from new messages, you can use ´getTagsFromMessage`.
+
```javascript
FlowdockText.getTagsFromMessage("@anyone seen this: http://www.example.com #cool");
@@ -74,13 +84,6 @@ FlowdockText.getTagsFromMessage("@Username, what do you think?", users, me);
[ ':user:1', ':unread:1' ]
```
-### Linkification
-
-```javascript
-FlowdockText.autoLink("hello @Username #greets");
-'hello <a title="Search @Username" class="app-tag-link" href="#flowser/all/@Username">@Username</a> <a href="#flowser/all/greets" title="#greets" class="app-tag-link">#greets</a>'
-```
-
## NPM
Install with: `npm install flowdock-text`

0 comments on commit a88fe3b

Please sign in to comment.