Today I continued to work on the word wrap and I’ve encountered some bugs. To fix them, I need to define how the editor handles leading and trailing spaces. The problem has three parts:
- I use spaces as delimiters for the word wrap.
- I don’t want the editor to show the leading and trailing spaces of word wrapped lines.
- How do I handle lines with many consecutive spaces?
One thing I’m thinking of doing is adding a leading and trailing space field to each line. Then when lines word wrap, I could just move spaces into or out of their respective fields.
Side note: While writing this post, I noticed the WordPress editor doesn’t handle lines with many spaces, either. It’s quite content to let me continue adding spaces, even as the cursor slides out of view xD
Your data is processed in accordance with my privacy policy. Comments are manually approved and may take a while to appear.