Feature #28796
closedMake sure that inline markups inserted by wiki toolbar are surrounded by whitespaces
0%
Description
I often use highlighting by asterisk(*) when writing a wiki.
To do so use the bold button on the toolbar.
(When you press the bold button, an asterisk is inserted at both ends of the selected character.)
However, if there are characters outside the asterisk, it will not be highlighted.
You need to manually insert a space next to the asterisk.
I think that you should insert spaces as well as asterisks by buttons.
I gave "bold" as an example, but the same applies to other single tags.
In Japanese and the like, sentences are rarely separated by spaces, so many people are in trouble with this.
markdown | textile |
![]() |
![]() |
Files
Updated by Mizuki ISHIKAWA over 6 years ago
I wrote a patch to realize this feature.
Updated by Mizuki ISHIKAWA over 6 years ago
- File add-space.patch add-space.patch added
Updated by Go MAEDA over 6 years ago
- Target version set to Candidate for next major release
In some languages such as Japanese, Chinese and Thai, words in a sentence are not separated by space. This patch should improve UX for people who speak those languages.
Here is an example of Japanese sentence:
今日は良い天気です。 (It is fine weather today.)
If you make the word "天気" (weather) bold by using wiki toolbar, you will get the text as follows. However, the word "天気" will not be displayed in bold because there are no whitespaces around the word. The behavior has confused many users in Japan.
今日は良い*天気*です。
After appling the Mizuki's patch, you will get the following text. It inserts spaces if there are no whitespaces around the selection. As a result, the word "天気" will be displayed in bold as expected.
今日は良い *天気* です。
I think the patch can improve UX for some Asian people without any negative side effects for other people.
Updated by Go MAEDA about 6 years ago
- File unnecessary-space-1.png unnecessary-space-1.png added
- File unnecessary-space-2.png unnecessary-space-2.png added
- Status changed from New to Needs feedback
- Assignee set to Mizuki ISHIKAWA
The patch looks good except one small issue. An unnecessary space will be inserted before the markup if a user selects text at the beginning of the first line. Could you update your patch?
→
Updated by Mizuki ISHIKAWA about 6 years ago
- File add-space-2.patch add-space-2.patch added
Go MAEDA wrote:
The patch looks good except one small issue. An unnecessary space will be inserted before the markup if a user selects text at the beginning of the first line. Could you update your patch?
I fixed the issue.
Thank you for your confirmation.
Updated by Go MAEDA about 6 years ago
- Subject changed from Insert a space when adding a single tag by the button to Ensure that phrase modifier inserted by wiki toolbar is surrounded by whitespaces
- Status changed from Needs feedback to New
- Assignee deleted (
Mizuki ISHIKAWA) - Target version changed from Candidate for next major release to 4.1.0
LGTM, setting target version to 4.1.0.
Updated by Go MAEDA about 6 years ago
- Subject changed from Ensure that phrase modifier inserted by wiki toolbar is surrounded by whitespaces to Make sure that inline markups inserted by wiki toolbar are surrounded by whitespaces
- Status changed from New to Closed
- Target version changed from 4.1.0 to 4.0.0
- Resolution set to Fixed
Committed with a slight change. Thank you for improving Redmine.