Enquote JSON strings.

pull/3752/head
Graham Leach-Krouse 4 years ago
parent 562ba45af5
commit bf9b7c87e1

@ -35,10 +35,10 @@ Quote.
Text Positions will be represented within an `m.markup.location` as follows: Text Positions will be represented within an `m.markup.location` as follows:
``` ```
m.markup.location: { "m.markup.location": {
m.markup.text.position: { "m.markup.text.position": {
start: .. "start": ..
end: .. "end": ..
} }
.. ..
} }
@ -70,11 +70,11 @@ the resulting complexity of normalization, special markdown characters should
Text Quotes will be represented within an `m.markup.location` as follows: Text Quotes will be represented within an `m.markup.location` as follows:
``` ```
m.markup.location: { "m.markup.location": {
m.markup.text.quote: { "m.markup.text.quote": {
exact: ... "exact": ...
prefix: ... "prefix": ...
suffix: ... "suffix": ...
} }
.. ..
} }
@ -101,12 +101,12 @@ endpoint of the range should be given either as a non-negative integer, or as a
`prefix`/`suffix` pair. So for example, `prefix`/`suffix` pair. So for example,
``` ```
m.markup.location: { "m.markup.location": {
m.markup.text.range: { "m.markup.text.range": {
start: 0, "start": 0,
end: { "end": {
prefix: "the", "prefix": "the",
suffix: " end" "suffix": " end"
} }
} }
} }
@ -133,10 +133,10 @@ selectors is very direct. In each case, we only need to add a field indicating
the selector type. So a location like: the selector type. So a location like:
``` ```
m.markup.text.quote: { "m.markup.text.quote": {
exact: ... "exact": ...
prefix: ... "prefix": ...
suffix: ... "suffix": ...
} }
``` ```
@ -144,19 +144,19 @@ becomes
``` ```
{ {
type: "TextQuoteSelector" "type": "TextQuoteSelector"
exact: ... "exact": ...
prefix: ... "prefix": ...
suffix: ... "suffix": ...
} }
``` ```
and and
``` ```
m.markup.text.position: { "m.markup.text.position": {
start: ... "start": ...
end: ... "end": ...
} }
``` ```
@ -164,9 +164,9 @@ becomes
``` ```
{ {
type: "TextPositionSelector" "type": "TextPositionSelector"
start: ... "start": ...
end: ... "end": ...
} }
``` ```
@ -186,11 +186,11 @@ the `exact` value equal to the suffix, and with no suffix provided.
So, for example, So, for example,
``` ```
m.markup.text.range: { "m.markup.text.range": {
start: 0, "start": 0,
end: { "end": {
prefix: "the", "prefix": "the",
suffix: " end" "suffix": " end"
} }
} }
``` ```
@ -199,16 +199,16 @@ becomes
``` ```
{ {
type: RangeSelector, "type: "RangeSelector",
startSelector: { "startSelector": {
type: TextPositionSelector, "type": "TextPositionSelector",
start: 0, "start": 0,
end: 0 "end": 0
} }
endSelector: { "endSelector": {
type: TextQuoteSelector "type": "TextQuoteSelector"
prefix: "the", "prefix": "the",
exact: " end" "exact": " end"
} }
} }
``` ```

Loading…
Cancel
Save