Feature #28796

Make sure that inline markups inserted by wiki toolbar are surrounded by whitespaces

Added by Mizuki ISHIKAWA 3 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Text formatting
Target version:4.0.0
Resolution:Fixed

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

markdown_bold.png (61.9 KB) Mizuki ISHIKAWA, 2018-05-17 02:15

textile_bold.png (61 KB) Mizuki ISHIKAWA, 2018-05-17 02:15

test.gif (382 KB) Mizuki ISHIKAWA, 2018-05-17 02:23

add-space.patch Magnifier (21 KB) Mizuki ISHIKAWA, 2018-05-17 02:25

unnecessary-space-1.png (8.4 KB) Go MAEDA, 2018-05-19 06:52

unnecessary-space-2.png (8.65 KB) Go MAEDA, 2018-05-19 06:52

add-space-2.patch Magnifier (21 KB) Mizuki ISHIKAWA, 2018-05-21 02:05

Associated revisions

Revision 17347
Added by Go MAEDA 3 months ago

Make sure that inline markups inserted by wiki toolbar are surrounded by whitespaces (#28796).

Patch by Mizuki ISHIKAWA.

History

#1 Updated by Mizuki ISHIKAWA 3 months ago

I wrote a patch to realize this feature.

#2 Updated by Mizuki ISHIKAWA 3 months ago

#3 Updated by Go MAEDA 3 months 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.

#4 Updated by Go MAEDA 3 months ago

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?

#5 Updated by Mizuki ISHIKAWA 3 months ago

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.

#6 Updated by Go MAEDA 3 months 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.

#7 Updated by Go MAEDA 3 months ago

  • Assignee set to Go MAEDA

#8 Updated by Go MAEDA 3 months 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.

Also available in: Atom PDF