test
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

mrr

12Me21 a2c39bb1 aedcbbf4

+12
+12
final.txt
··· 8 8 so, our parser needs to output 2 things: 9 9 - {text,facets} (though, while typing, we only need to fully compute the grapheme length of the text) 10 10 - list of spans to highlight in the input 11 + 12 + 13 + so like, as our markup parser runs, we want to be uhh 14 + - as we consume segments from the input, we push them to the overlay segments list, with styles. so like [i]test[/i] pushes segments like 15 + {text: "[i]", class:"syntax"} 16 + {text: "test", class:"italic"} 17 + {text: "[/i]", class:"syntax"} 18 + the "syntax" class is special because it indicates strongly that hey this is NOT going to affect output length linearly. wheras the well generally non-syntax text spans will be propagated directly to the output. so to those, we apply styles that indicate how they will be rendered. 19 + 20 + - at the same time, we are generating a list of spans. these will have a structure like: 21 + {text: "test", features:[{$type:TBD, style:"italic", surround:["/","/"]}]} 22 + - then, we process these spans into windows, as before, except with surround instead of strip. after the windows are generated, is when we turn surround into strip. (by inserting the chars at the start/end of each segment, and setting strip to their length)