WordPress.org

Ready to get started?Download WordPress

Forums

How do I get WordPress to line break with hyphens? (2 posts)

  1. Torley
    Member
    Posted 7 years ago #

    Hello, I found this old post which relates:

    http://wordpress.org/support/topic/4099?replies=6

    but haven't found anything thus far which directly relates.

    My problem is that with WordPress, I'll use hyphens between multiple words, and it doesn't split the line at the hyphen, but rather, at the end of the word. This is aesthetically problematic because it creates large gaping voids of space on the right sides of some lines. Also, rare but it does happen: making a long blog post with hyphens in the name, which is wider than a sidebar, will have it overrun into the rest of the blog. I-wish-there-would-be-line-breaks-with-hyphens. :)

    Is there a plugin or easy way to do this? Or do I still have to manually insert a space after a hyphen when I want it to be separated?

    Any help on this gratefully appreciated, thanx so much!

  2. pianosteve
    Member
    Posted 7 years ago #

    A plugin would be the way to go, if the logic can be worked out. The problem, the way I see it, however, is that there are so many variables at play here. For example, if your theme is fixed-width, that's one thing, but what if it's fluid? Then, you never know where the right-hand "margin" of the post is.

    Another potential problem is that some long hyphenated thing might work fine at the beginning of a line, but what if it's starting in the middle of the line? How would WP know that?

    This actually sounds to me to be a limitation in browser presentation and not something easily coded in logic on the WP side. Does anyone know how word processor applications handle this sort of thing?

    I may be very wrong, however! :)

Topic Closed

This topic has been closed to new replies.

About this Topic