Proposal for (source-side) hyphenation support

Dennis E. Hamilton
Fri, 31 Mar 2017 17:27:24 -0000

> -----Original Message-----
> From: Markdown-Discuss [mailto:markdown-discuss-
> bounces at six.pairlist.net] On Behalf Of Nico Huber
> Sent: Friday, March 31, 2017 09:58
> To: markdown-discuss <markdown-discuss at six.pairlist.net>
> Subject: Proposal for (source-side) hyphenation support
>
> Hi there,
>
> don't know if this has been discussed before, or if I just overlooked
> how to do it: I'm missing support for hyphenation in Markdown files.
> Looking at always ragged HTML pages is already hard enough, so I can't
> bear anything but halfway justified text in my editor and manually hy-
> phenate words.
>
> I would do it as follows: 1. If a hyphen followed by a single new-line
> character is encountered "-\n[^\n]", drop the hyphen and any
following
> whitespace. 2. In case you have to break a word that includes a hyphen,
> you would escape the new-line character "-\\\n". Like this:
Escape new-\
> line character to preserve the hyphen. This way, the hyphen wouldn't
> occur in front of the new-line char and 1. doesn't apply. Although, any
> whitespace following the new-line char would also have to be dropped in
> this case.
>
> What do you think?
[orcmid]

I think we need to think about how this is conveyed into HTML, and what browsers
might do, since that is where the actual layout width is determined.  It should
be assumed that reflow can happen at any time and the soft-hyphen might be
usable along with whatever other automatic hyphenation the browser uses.

A direct method would be to insert soft-hyphen (SHY) codes, code-point 0xAD in
Unicode and in Latin-1.

I recommend working backward from that to find a Markdown escape that serves
this purpose.

>
> Regards,
> Nico
> _______________________________________________
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
> https://pairlist6.pair.net/mailman/listinfo/markdown-discuss