2 of 2
2
PHP Markdown Extra Plugin
Posted: 18 April 2008 01:32 PM   [ Ignore ]   [ # 19 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

Is anyone using this with 1.6.3?  I previously was able to keep ‘automatically turn urls and email addresses into links’ on while using Markdown, so someone could either use Markdown or just put in a url and both would make links, but I just installed Markdown on a 1.6.3 site and the automated links are breaking Markdown style links.

I seem to remember having this problem previously on a different site, but then somehow got it working. Can’t remember what I did though. Any help?

Profile
 
 
Posted: 10 October 2008 06:57 AM   [ Ignore ]   [ # 20 ]  
Grad Student
Avatar
Rank
Total Posts:  58
Joined  12-27-2005

Just so everyone is aware, the plugin has been updated to use Markdown Extra 1.2.2, and is now free from the WordPress-specific code that comes embedded in Michel Fortin’s script.

And, since the forum is throwing issues when I try to upload the new version, you can now download it here.

 Signature 

www: http://aaronkuzemchak.com/
twitter: http://twitter.com/akuzemchak

Profile
 
 
Posted: 01 November 2008 12:42 PM   [ Ignore ]   [ # 21 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  144
Joined  11-30-2004

Kuz, thanks for keeping the Markdown Extra plugin up to date!

I’m still having an issue with inline HTML elements getting encoded—or, more specifically, the closing tag of the element(s). I reported the issue a few years ago but wasn’t able to come to a resolution. Basically, the plugin is encoding the opening bracket (so “<” becomes “&-l-t-;”). [Dashes added to avoid entity being rendered.]

For example, a line like:

All I want for Christmas is <del>my two front teeth</del> <ins>a MacBook Pro</ins>.

Becomes:

<p>All I want for Christmas is <del>my two front teeth&-l-t-;/del> <ins>a MacBook Pro&-l-t-;/ins>.</p>

The strange thing is that this doesn’t seem to happen to text that’s parsed from a weblog entry —only that which is static in a template. I believe the problem is with the ExpressionEngine interpretations, not the original PHP Markdown translation—as the Dingus handles inline HTML elements as expected.

Have any insights?

Profile
 
 
Posted: 04 November 2008 08:35 PM   [ Ignore ]   [ # 22 ]  
Grad Student
Avatar
Rank
Total Posts:  58
Joined  12-27-2005

Hey Sean! That’s an interesting issue, and unfortunately I don’t know much about EE’s plugin structure… I pretty much just copied the Markdown plugin that Paul wrote, but dropped in the Markdown Extra script instead. I’m also not good enough with PHP to really figure out what’s going on with it. Enough excuses though.

What I was able to find was line 1385 of pi.markdown.php:

$text = str_replace('<', '<', $text);

I found that if I commented out this line, it fixed the issue. However, I haven’t tested it enough to see what kind of negative effects this would have. If you want to play around with it, be my guest… as I’d be more than curious to see what the results were. Either way, I think we may want to try getting Michel Fortin’s opinion as to why this is happening, and what can really be done to fix it.

Thanks for bringing this up again though… I hope we can figure it all out!

 Signature 

www: http://aaronkuzemchak.com/
twitter: http://twitter.com/akuzemchak

Profile
 
 
Posted: 06 November 2008 01:21 PM   [ Ignore ]   [ # 23 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  144
Joined  11-30-2004

Thanks Kuz, that fix does seem to be working ... so far. I’ll report back here if/when I have more conclusive results.

Profile
 
 
Posted: 06 November 2008 01:23 PM   [ Ignore ]   [ # 24 ]  
Grad Student
Avatar
Rank
Total Posts:  58
Joined  12-27-2005

Thanks Sean! Hopefully you won’t have any issues, but make sure to let me know, as I’ll comment that line out permanently in the code if it appears to work!

 Signature 

www: http://aaronkuzemchak.com/
twitter: http://twitter.com/akuzemchak

Profile
 
 
   
2 of 2
2
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64944 Total Logged-in Users: 76
Total Topics: 81925 Total Anonymous Users: 51
Total Replies: 440355 Total Guests: 303
Total Posts: 522280    
Members ( View Memberlist )