Page MenuHomePhabricator

After "-" and "&shy" at the end of a line, no space should be added.
Open, LowestPublicFeature

Description

Author: jofiwiki

Description:
To be able to keep the original line breaks of a text in the source code, it is
necessary to remove the space that is usually added if a newline starts, when
having a (soft) hyphen at the end of the line. Otherwise "twenty- three" instead
of "twenty-three" and "Wiki pedia" instead of "Wikipedia" (with soft hyphen) is
displayed.
This enhancement would be useful especially for Wikisource, where the line
breaks of an original text could be kept in the source and so the original
formating of the text could be displayed. This would also make proof reading
much easier.


Version: unspecified
Severity: enhancement

Details

Reference
bz4473

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:01 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz4473.

jofiwiki wrote:

To clarify it: If you have an original text like this:
Dies ist ein Beispieltext, der nur Test-
zwecken dient.
it is displayed in Wikisource like "Dies ist ein Beispieltext, der nur Test-
zwecken dient." Correct would be: "Dies ist ein Beispieltext, der nur
Testzwecken dient." (without "-" and empty space)
If adding this to the source text:
Dies ist ein Beispieltext, der nur Test­ (or anything else instead of "shy")
zwecken dient.
would result in the correct text when viewing the article, it were possible to
keep the original formatting in the source text and have nice text in the
article view.

jofiwiki wrote:

The system added a line break: After "it is displayed in Wikisource like.." in
the 4th line it should be shown "Test- zwecken". That is what Mediawiki displays.

­ is extremely unreliable in current browsers; behavior is inconsistent from
vendor to vendor. I wouldn't expect this to work the way you want even if the newline
were stripped.

jofiwiki wrote:

Unfortunately I didn't explain it enough. It would be a nice additional feature
if ­ always worked, but what I would like to have is a possibility to keep
the original line break in the source text view and have nice text in the
article view. Therefore I would like to have a character/string that is not
displayed itself and "deletes" the empty space after it when there is a line
break in the source. This can be &shy; but could also be "<->" or something
else. It should just make possible that
exam<->
ple
in the sourcetext view results in "example" instead of "exam ple" in the article
view.
The same should be with "-" at the end of line in the source text:
twenty-
three
should result in "twenty-three" in the article view instead of "twenty- three"

I would like to work on this bug.Can someone please assign this to me

(In reply to comment #4)

Unfortunately I didn't explain it enough. It would be a nice additional
feature
if &shy; always worked, but what I would like to have is a possibility to
keep
the original line break in the source text view and have nice text in the
article view. Therefore I would like to have a character/string that is not
displayed itself and "deletes" the empty space after it when there is a line
break in the source. This can be &shy; but could also be "<->" or something
else. It should just make possible that
exam<->
ple
in the sourcetext view results in "example" instead of "exam ple" in the
article
view.
The same should be with "-" at the end of line in the source text:
twenty-
three
should result in "twenty-three" in the article view instead of "twenty-
three"

I am assigned to this bug.Can you please figure out the link or the page where you found it.

Qgil lowered the priority of this task from Low to Lowest.
Qgil set Security to None.

If I understand the task on the right way this means the parser should convert

Lorem
ipsum

to

Lorem ipsum

but

Lorem-
ipsum

to

Lorem-ipsum

instead of

Lorem- ipsum

I think this complicates the parser unnecessarily. You can just use

Lorem-ipsum

in the wikitext to get

Lorem-ipsum

Or if you want to have a line break without whitespace use

Lorem-<!--
-->ipsum

I suggest to decline this task.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:02 AM