Open hamstar opened 12 years ago
Heres some code that should be able to split up paragraphs into sentences:
"One sentence. And another sentence. The temp is 42.5 today".gsub(/\.?\s?([\w+ ]+\.?)/, "<span>\\1</span> ")
This produces:
<span>One sentence.</span> <span>And another sentence.</span> <span> The temp is 42.</span> <span>5 today</span>
I dunno how to fix splitting at the decimal point of that number though...
I think perhaps we don't need to/shouldn't split the paragraphs in this way. There was an interesting idea brought up in Issue #33 where users would be able to highlight an arbitrary portion of text and comment/change it. So instead of a bill having many sentences, we could make a comment or change just have a beginning and end point within the text. Of course, it will be more complicated than that, but I think that will give the users far more flexibility than a sentence by sentence break down.
I agree with jonlaing. The suggestion in #33 would be a great addition.
Styling constraints
Like StackOverflow
But maybe a little different. Same kind of thing though, a main upvotable thing with (upvotable?) comments below it.