better formatted example

This commit is contained in:
or-else
2017-08-24 20:16:53 -07:00
parent 0a2abc080f
commit d34f51a9d0
+13 -112
View File
@@ -22,120 +22,21 @@ Text:
Sample JSON representation of the text above: Sample JSON representation of the text above:
{ {
"txt":"this is bold, code and italic, strike combined bold and italic an url: https://www.example.com/abc#fragment " + "txt": "this is bold, code and italic, strike combined bold and italic an url: https://www.example.com/abc#fragment " +
"and another www.tinode.co this is a @mention and a #hashtag in a string second #hashtag", "and another www.tinode.co this is a @mention and a #hashtag in a string second #hashtag",
"fmt":[ "fmt": [
{ { "at":8, "len":4,"tp":"ST" },{ "at":14, "len":4, "tp":"CO" },{ "at":23, "len":6, "tp":"EM"},
"at":8, { "at":31, "len":6, "tp":"DL" },{ "tp":"BR", "len":1, "at":37 },{ "at":56, "len":6, "tp":"EM" },
"len":4, { "at":47, "len":15, "tp":"ST" },{ "tp":"BR", "len":1, "at":62 },{ "at":120, "len":13, "tp":"EM" },
"tp":"ST" { "at":71, "len":36, "key":0 },{ "at":120, "len":13, "key":1 },{ "tp":"BR", "len":1, "at":133 },
}, { "at":144, "len":8, "key":2 },{ "at":159, "len":8, "key":3 },{ "tp":"BR", "len":1, "at":179 },
{ { "at":187, "len":8, "key":3 },{ "tp":"BR", "len":1, "at":195 }
"at":14,
"len":4,
"tp":"CO"
},
{
"at":23,
"len":6,
"tp":"EM"
},
{
"at":31,
"len":6,
"tp":"DL"
},
{
"tp":"BR",
"len":1,
"at":37
},
{
"at":56,
"len":6,
"tp":"EM"
},
{
"at":47,
"len":15,
"tp":"ST"
},
{
"tp":"BR",
"len":1,
"at":62
},
{
"at":120,
"len":13,
"tp":"EM"
},
{
"at":71,
"len":36,
"key":0
},
{
"at":120,
"len":13,
"key":1
},
{
"tp":"BR",
"len":1,
"at":133
},
{
"at":144,
"len":8,
"key":2
},
{
"at":159,
"len":8,
"key":3
},
{
"tp":"BR",
"len":1,
"at":179
},
{
"at":187,
"len":8,
"key":3
},
{
"tp":"BR",
"len":1,
"at":195
}
], ],
"refs":[ "refs": [
{ { "tp":"LN", "data":{ "url":"https://www.example.com/abc#fragment" } },
"tp":"LN", { "tp":"LN", "data":{ "url":"http://www.tinode.co" } },
"data":{ { "tp":"MN", "data":{ "val":"mention" } },
"url":"https://www.example.com/abc#fragment" { "tp":"HT", "data":{ "val":"hashtag" } }
}
},
{
"tp":"LN",
"data":{
"url":"http://www.tinode.co"
}
},
{
"tp":"MN",
"data":{
"val":"mention"
}
},
{
"tp":"HT",
"data":{
"val":"hashtag"
}
}
] ]
} }
*/ */