Project

General

Profile

Actions

Feature #28796

closed

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

Added by Mizuki ISHIKAWA almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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

Files

markdown_bold.png (61.9 KB) markdown_bold.png Mizuki ISHIKAWA, 2018-05-17 02:15
textile_bold.png (61 KB) textile_bold.png Mizuki ISHIKAWA, 2018-05-17 02:15
test.gif (382 KB) test.gif Mizuki ISHIKAWA, 2018-05-17 02:23
add-space.patch (21 KB) add-space.patch Mizuki ISHIKAWA, 2018-05-17 02:25
unnecessary-space-1.png (8.4 KB) unnecessary-space-1.png Go MAEDA, 2018-05-19 06:52
unnecessary-space-2.png (8.65 KB) unnecessary-space-2.png Go MAEDA, 2018-05-19 06:52
add-space-2.patch (21 KB) add-space-2.patch Mizuki ISHIKAWA, 2018-05-21 02:05
Actions #1

Updated by Mizuki ISHIKAWA almost 6 years ago

I wrote a patch to realize this feature.

Actions #3

Updated by Go MAEDA almost 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.

Actions #4

Updated by Go MAEDA almost 6 years 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?

Actions #5

Updated by Mizuki ISHIKAWA almost 6 years 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.

Actions #6

Updated by Go MAEDA almost 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.

Actions #7

Updated by Go MAEDA almost 6 years ago

  • Assignee set to Go MAEDA
Actions #8

Updated by Go MAEDA almost 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.

Actions

Also available in: Atom PDF