torchbox / torchbox/wagtail-tinytableblock
Normalize non-breaking spaces
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10
- Forks
- 4
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 1
Description
When pasting tables non-breaking spaces can be inserted and cause issues with formatting or converting data to other formats like CSV. Microsoft Word seems to be particularly aggressive with replacing all spaces with .
We could address this in 2 different ways.
- Strip all non-breaking spaces from table content
- Update the
paste_postprocessjs method to strip non-breaking spaces from pasted content, but allow users to insert them manually into the table.
Happy to look at either of these if there's an opinion as to which should be implemented.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the paste_postprocess JavaScript method and the table paste or formatting tests, if present. Compare the two proposed handling approaches, then verify that pasted non-breaking spaces no longer disrupt table formatting or conversion to CSV while the chosen behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100