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?
1) smart replacement is enabled
2) That supposed to be mdash, not ndash
<p>Результатом этого будет обнаружение того, что то счастье и радость, которые вы ищите, является вашей неотъемлемой природой. Вы сможете обнаружить, что в жизни нет повода для страданий, что жизнь естественна полна, что жизнь является ни чем иным, как волнами радости, счастья, красоты и Божественной Любви, что природа жизни – это Блаженство.</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? что природа жизни - это Блаженство
?
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
что природа жизни — это Блаженство
as expected.
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.
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 🙂
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.
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.
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.)