You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/reference/meta/entities.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Ranges specified by entities may be adjacent, but may not overlap.
15
15
16
16
<divclass="alert alert-info"><b>Note:</b> <code>pos</code> and <code>len</code> fields are given as UTF-32 code points. Many string implementations (in particular, Cocoa's NSString class and Javascript's strings) use UTF-16 or UCS-2 encoding internally, and thus the indices given will not map directly to UTF-16 code points if encoded with surrogate pairs, e.g., emoji characters.</div>
17
17
18
-
All of the following examples are about the following post:
18
+
All of the following examples are about the following text:
19
19
20
20
> @berg FIRST post on this new site #newsocialnetwork
<%= curl_example(:post, "posts", :post, {:data => "text=join.app.net getting ready for the world w/ @dalton@berg@voidfiles@jhubball@aaronblyth@andrew@vinitlee@mark@mintz@barmstrong@laughingman@mikegreenspan@ben #joinus", :content_type => nil}) %>
32
32
33
33
#### Example (JSON Data)
34
34
35
35
<% data = {
36
-
"text" => "@bergFIRST post on this new site #newsocialnetwork",
36
+
"text" => "join.app.net getting ready for the world w/ @dalton@berg@voidfiles@jhubball@aaronblyth@andrew@vinitlee@mark@mintz@barmstrong@laughingman@mikegreenspan@ben #joinus",
37
37
"annotations" => [{
38
38
"type" => "net.app.core.geolocation",
39
39
"value" => {
@@ -42,7 +42,7 @@ If you want to test how your text will be processed you can use the [text proces
42
42
}
43
43
}]
44
44
} %>
45
-
<%= curl_example(:post, "posts?include_post_annoations=1", :first_post, {:data => data}) do |h|
45
+
<%= curl_example(:post, "posts?include_post_annoations=1", :post, {:data => data}) do |h|
"text"=>"Hi, I'm Mark Thurman and I'm teaching you about the @appdotnet Stream #API.",
171
-
"html"=>"Hi, I'm Mark Thurman and I'm <a href=\"https://github.com/appdotnet/api_spec\" rel=\"nofollow\">teaching you</a> about the <span itemprop=\"mention\" data-mention-name=\"appdotnet\" data-mention-id=\"3\">@appdotnet</span> Stream #<span itemprop=\"hashtag\" data-hashtag-name=\"api\">API</span>.",
"text"=>"@berg FIRST post on this new site #newsocialnetwork",
301
-
"html"=>"<span itemscope=\"https://app.net/schemas/Post\"><span itemprop=\"mention\" data-mention-name=\"berg\" data-mention-id=\"2\">@berg</span> FIRST post on <a href=\"https://join.app.net\" rel=\"nofollow\">this new site</a> <span itemprop=\"hashtag\" data-hashtag-name=\"newsocialnetwork\">#newsocialnetwork</span>.</span>",
# since posts have text, html, entities, instead of always having to override in the block, provide more options here if we care
354
427
# about what the text is
355
428
356
-
# No user defined link here
357
-
FIRST_POST=POST.merge({
358
-
"html"=>"<span itemscope=\"https://app.net/schemas/Post\"><span itemprop=\"mention\" data-mention-name=\"berg\" data-mention-id=\"2\">@berg</span> FIRST post on this new site <span itemprop=\"hashtag\" data-hashtag-name=\"newsocialnetwork\">#newsocialnetwork</span>.</span>",
0 commit comments