Closed aahan closed 11 years ago
You haven't said what it does when you change the priority of the twentythirteen_aside_date
filter.
To me looks like the twentythirteen_aside_date
function expects $content
to not end with empty lines. What happens if you go edit your post so there's no empty line after the content?
Anyway, maybe I'm missing something, but the way this works seem pretty fragile and dependent on how Wordpress processes text in its default configuration. I don't think there is a way to make it work without changing the theme, at least not without hard-coding in markdown.php or in another filter a regular expression that detects a <span class="date">
and fix things for that special case.
To me looks like the twentythirteen_aside_date function expects $content to not end with empty lines. What happens if you go edit your post so there's no empty line after the content?
Not it can't be that. I tried publishing the post with and without an empty line (I usually don't place an empty line at the end of a post), and the issue persists.
You haven't said what it does when you change the priority of the twentythirteen_aside_date filter.
Like I said, it fixes the problem, i.e., the output is the way it should be:
<div class="entry-content">
<p>
Here’s a pitch for a sequel to The Big Lebowski: <em>The Little Lebowski</em>, which follows the love-child of Maude and The Dude. I’d watch that, and I’d be dressed as a nihilist at the cinema.
<span class="date"> HTML CODE FOR DATE HERE </span>
</p>
</div>
@michelf The so problem seems to be that the function in the theme that I am talking about, needs to execute before PHP Markdown plugin does, and that's not happening because you set the priority to 6
in markdown.php. Does that make any sense?
Also, I was wondering what blogging platform you use. It doesn't look like WordPress.
According to my (probably outdated) schematics of how PHP Markdown reshapes Wordpress's text system (it needs to move a couple of filters around so that Wordpress does not interfere with the syntax, details here), you need to put the Markdown filter pretty much before everything else. In this case, twentythirteen_aside_date
needs to be done prior Markdown. But twentythirteen_aside_date
must be done after embeds (according to the comment) while Markdown should be before embeds. There's no good solution to this cyclic dependency other than to "fix" twentythirteen_aside_date
so it can work after Markdown.
You're right, my blog doesn't use Wordpress. I use a custom thing for my blog (and the rest of my site) built on top of Piecrust.
Okay. Two good plugins I know use PHP Markdown. I'll share the issue with the authors on the support forums and see if they can help. (I'll post back if I have some news.) Thanks for your time Michel!
Closing this issue since it seems nothings remain to do here.
Yep. Didn't receive any reply from devs who maintain markdown plugins for WordPress, so it's best to keep the issue closed until I can get more info.
In WordPress' upcoming flagship theme "Twenty Thirteen" there's this code in functions.php:
What it does is add entry date to aside posts after the content. For example, like this (live preview):
The problem is, with PHP Markdown/Extra in place, the output is like this (live preview):
That's right! The date is output outside the paragraph if PHP Markdown/Extra is enabled.
Changing this line in the function (which I mentioned above):
To this (changing priority to a number < 6):
Fixes the problem. But the comment for the line says, "After embeds, before everything else", it doesn't look like the theme should be modified, or it'd break something else.
Can something be changed in markdown.php? or is it something to be done within the theme itself? I am looking forward to some input from you.