New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blast treats spaces between words as non-characters. #8
Comments
I've emailed you the revised version of Blast.js :)
Thanks, man! |
I see your email and will take a look soon. Let me speak to your questions above now.
By the way, another product I work on uses Velocity under the hood and we see significant improvement of the animation quality. Thanks a ton for your hard work. |
Thanks for the kind words! My pleasure. As for -precise, I think that's a bit of an odd sounding word despite it being contextually accurate. You make a good point about using My motivation for starting at 1-based was that it wasn't matching every character and therefore wasn't a true index of all matches relative to their original bodies of text. Further, these wrapper elements wind up being referred to in CSS sometimes, and it just seemed odd to mix 0th-based counting with styling. But it's what I should have done to begin with. I have no real good reason. Thanks for waxing poetic on this point for me. Awaiting your test results. Thanks again. |
how'd this work out? |
Fixed. See new release. there's now an |
Blast treats spaces between words as non-characters. This causes the character delimiter to return improper indexes. Because of this, lining up character index data with blast's generated blast-indexes is very difficult.
There should be an option to treat whitespace as characters in order to maintain the actual index of characters from start to finish in a string of text.
By the way... this could be handled simply (I think) by adding a "preserveWhitespace" option that would only apply to characters. Then, you could do this inside the delimiter creation section:
I don't know if "." is the best way to do this. Perhaps it should only preserve the actual space character.
As a sidenote, to render properly you would need to give white-space: pre|pre-line|pre-wrap to the blasted element to make the spaces not collapse in their own HTML elements.
@julianshapiro , did you consider any of this during initial development?
The text was updated successfully, but these errors were encountered: