• Resolved Bloomhash

    (@bloomhash)


    Maybe I don’t understand enough, how plugin supposed to work.

    I encounter short dashes (-) where must be M-dashes (—). Tried Eng-US option and international option.

    And also plugin lets the row brake, when G. is separated from Bush: first letter of the name with a dot and a surname.

    https://wordpress.org/plugins/wp-typography/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author pepe

    (@pputzer)

    Smart character replacement is enabled? Have you got a test page where I can see what does not work (or post an excerpt as code sample here)?

    As for abbreviated names: That’s currently not a feature of wp-Typography. How should an algorithm distinguish an abbreviated first- or middle name from a lone character at the end of a sentence?

    Thread Starter Bloomhash

    (@bloomhash)

    1) smart replacement is enabled

    2) That supposed to be mdash, not ndash

    <p>Результатом этого будет обна­ру­же­ние того, что то сча­стье и&nbsp;радо­сть, кото­рые вы ищите, явля­ется вашей неотъ­ем­ле­мой при­ро­дой. Вы смо­жете обна­ру­жить, что в&nbsp;жизни нет повода для стра­да­ний, что жизнь есте­ственна полна, что жизнь явля­ется ни чем иным, как вол­нами радо­сти, сча­стья, кра­соты и&nbsp;Божественной Любви, что при­рода жизни &ndash; это Блаженство.</p>

    3) You’re right. I thought it would be strange to have capitalize letter in the end of sentence, so it rather be abbreviated name, but it’s not 100% correct logic.

    Plugin Author pepe

    (@pputzer)

    You mean this one? What’s the source for this? что при­рода жизни - это Блаженство?

    Thread Starter Bloomhash

    (@bloomhash)

    yes, this one.

    this is the source:
    что природа жизни - это Блаженство

    Plugin Author pepe

    (@pputzer)

    Mhm. What are your settings exactly? Because I’ve just added

    что природа жизни - это Блаженство

    to my unit tests and the result with dash style traditionalUS is

    что природа жизни &mdash; это Блаженство

    as expected.

    Thread Starter Bloomhash

    (@bloomhash)

    Thank you, I got the problem.
    US-option converts hyphen to mdash successfully.

    It happens not with a hyphen (-), but with a minus (–).
    Looks like users tried to make dashes longer, but instead of mdashes used to put minuses, so we have ndashes in html.

    And plugin doesn’t convert ndashes to mdashes, thinking that smart users insert smart characters.

    Plugin Author pepe

    (@pputzer)

    Yes, the plugin only changes “typewriter” characters and assumes that any “smart” characters are included intentionally.

    Thread Starter Bloomhash

    (@bloomhash)

    Pepe, thank you for the great plugin, which makes texts beautiful!

    And I wish you to resmart even some smart users in future releases 😉

    Plugin Author pepe

    (@pputzer)

    Thank you. I’ll think about adding an option to do that (although the settings are a bit on the complex side already).

    BTW, it would be great if you could find the time to write a review of wp-Typography 🙂

    Thread Starter Bloomhash

    (@bloomhash)

    It seems I found one more issue.

    On my homepage via php-template I’ve inserted content of one page — before news feed — and it starts with paragraph, containing img, and following paragraph, containing quotation.

    If I go to that page address, first quot («) is processed by plugin with class=dquo, pulled out to the left of paragraph border.
    But on my homepage the same quot is not processed and lays within paragraph border.

    Plugin Author pepe

    (@pputzer)

    If that’s custom code in your template, you probably need to call WP_Typography::get_instance()->process( 'your html' ); because it’s not covered the by the_content filter.

    Thread Starter Bloomhash

    (@bloomhash)

    I’m not that good programmer, could you improve that part of my code, please?

    echo '<article class="post hentry format-standard">
    	<header class="entry-header page-header">
    		<h1>' . $page_data->post_title . '</h1></header>
    	<div class="entry-content">';
    		echo $page_data->post_content;
    	echo '</div></article>';
    Plugin Author pepe

    (@pputzer)

    Are any other transformations applied to the fragment as well? If so, there’s something else going on. (I ask because hyphenation is tricky – it’s easy to mistake CSS hyphenation for wp-Typography’s hyphenation.)

    ?><article class="post hentry format-standard">
    	<header class="entry-header page-header">
    		<h1><?php echo $page_data->post_title ?></h1>
            </header><div class="entry-content"><?php
                    echo WP_Typography::get_instance()->process( page_data->post_content )
           ?></div></article><?php

    should do the trick, if it’s not something else.

    Thread Starter Bloomhash

    (@bloomhash)

    Oh, thank you, that works.
    Of course, with a ‘$’ near ‘page_data’ )))

    Plugin Author pepe

    (@pputzer)

    Glad it worked. You should disable CSS hyphenation if you want to use the fine-grained control provided by wp-Typography, BTW. (Otherwise you will have mixture of both.)

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Problem with dashes and G. Bush’ is closed to new replies.