PDA

View Full Version : Markdown Troubles - Please Help


japanwindow
07-07-2005, 12:50 AM
For some reason Markdown is not working. Here are some examples:

- When I enter a double space, the result is a single space (no paragraph break and the double space is "corrected").

- When I try to add a link, I get the correct text, but no link. (It's just plain text and the link part in brackets is not showing.)

- When I add empasis using astericks, all I get is plain text (the astericks are gone, but the text is not bold).

I have checked my index.php and it seems like all the Markdown related lines are there and correct. It's clear Markdown is doing SOMETHING, but apparently not what it's supposed to do.

I'm wondering if:

- my version of PHP is outdated?
- it's a Firefox problem (I doubt that)
- there is some step I'm leaving out??

About PHP, my host shows that I have Mod Php 4.3.10 and Mod Php 5.0.3 (but not Mop Php 4.3.0) installed.

Can anyone help? Thanks.

blinking8s
07-07-2005, 01:27 AM
Markdown is a little different than you think

did you read through
http://daringfireball.net/projects/markdown/basics
http://daringfireball.net/projects/markdown/syntax

?

japanwindow
07-07-2005, 02:24 PM
Sorry, I accidentally started a new topic last time.

I have carefully read and reread the article about markdown. Whenever I post text with Markdown syntax in my blog, it doesn't work. It's strange, because the syntax disappears (for example, the astericks dissapear), but the text is not changed (it's not bold, or linked, etc).

This last time I tried to post a block quote, using the little carrots (actually, I just cut and pasted the syntax exactly as indicated). There was no block quote, and no carrots. The text that I posted was all moved up to join the paragraph above just like nothing...this is frustrating.

Could it be because I don't have the correct PHP mod installed. I don't know how these PHP mods work. My host shows that 4.3.10 mod is installed, but not 4.3.0 mod. I'll try installing 4.3.0 since noone is giving any better suggestions, then I'll post the result here.

japanwindow
07-07-2005, 02:33 PM
I upgraded to PHP 5.0.3 and that didn't solve the problem. Can anyone helpl, please?

japanwindow
07-07-2005, 03:52 PM
I checked to make sure Markdown PHP is actually in the addons folder (it is, and it's CHMOD 644). When I open the "addons" tab in Pixelpost Markdown is NOT mentioned there. Is that normal?

I continue to test with the same results. The characters that I add for syntax (astericks for example) dissapear (with no result) and the text all gets compacted into one paragraph.

japanwindow
07-08-2005, 07:47 AM
Correction to the above post: I meant the "includes" folder. I'm starting to get the feeling that noone here really understands Markdown very deeply. 27 people have viewed this thread, but only one not-so-useful response.

One other possible clue that occurred to me is that I'm using Japanese Windows. I wonder if inputing characters with Japanese Windows could cause a problem (some sort of unicode glitch).

Or possibly my web host (Westhost) may not be set up for Markdown??

Anyone? Anyone?

blinking8s
07-08-2005, 07:58 AM
please be patient...we understand the basic workings of markdown but it is not our code, its a very well known tool though, but the problem is unusual and we all often have our hands tied around here

have you tried emailing jthe creator? or searching google for similar errors?

japanwindow
07-08-2005, 08:17 AM
I just joined an email list hosted by John Gruber and posted a detailed question. Hopefully, someone there has seen this before. Sorry about being impatient. I'm just frustrated that I haven't solved this myself by now. It seems like the solution should be very simple.

A couple more things:
- I can't find any reference to Markdown in my image template. Should something be there?

- The index.php seems to have it covered with this:

// includes
require("includes/pixelpost.php");
require("includes/markdown.php");
require("includes/functions.php");
require("includes/exifer1_5/exif.php");

I'll let you know if I hear back on my question to the email list.

Connie
07-08-2005, 08:52 AM
there is no reference to Markdown in the templates, as the markup is used when entering new images in ADMIN, then when entering the code and confirming, MARKDOWN is used to parse the entered text and to convert it to HTML before it is written into the database

after that, the text is HTML-code in the database without any reference to Markdown anymore

we have this editor included, in other CMS like nucleus for example, other Editors for the text-area of the "new post"-form are included

japanwindow
07-08-2005, 09:22 AM
I'm not sure if I understood that last part. But the key, I think, is that Markdown is included. Since I didn't change index.php, it should be working as normal. It IS doing something, but it's not parsing the way it's supposed to.

Just to be most clear, here is the text of the email that I sent to the Markdown mailing list:

I’ve been searching Google and asking questions on forums with no success, so I finally turned here for help. I have a blog powered by Pixelpost (see the link below). Markdown (for PHP I assume) should be enabled by default, and it seems to work just fine for other Pixelpost users, but it’s not working for me. Here are some examples of what happens when I try to use Markdown.

1. I type *example* (hoping for bold text). When I post the entry the astericks disappear but the text is not bold.

2. I type a “>” before a line hoping to get blocked text. In the actual post, the “>” disappears but the text is not blocked.

3. I use the Markdown syntax for a link (copied and pasted directly from the article explaining syntax). In the actual post the syntax all disappears but the text is regular plain text with no link.

4. I hit the space bar twice and type “return” and nothing happens.

5. I try using an HTML break “</br>” tag. The tag disappears but there is no line break.

In fact, no matter what I do, all the text is always compressed upwards with no breaks.

I can’t think of any reason why Markdown would not be working. I didn’t change any of the PHP files that came with Pixelpost, and all the files are installed in the correct places. Could this be related to any of the following:

- using a computer with Japanese Windows (English Windows converted to Japanese)

- my web host not supporting Markdown (I use Westhost)

- some part of Perl being missing (I have Perl 5.6 or something like that installed)

Michel Fortin
07-08-2005, 02:12 PM
I think the only way something like this can happen is if Markdown is processed, then the tags are stripped. I would look in that direction.

(Are you using <IMAGE_NOTES_CLEAN> in your PixelPost template instead of <IMAGE_NOTES>?)

* * *

- using a computer with Japanese Windows (English Windows converted to Japanese)
Should be no problem as long as the character set is UTF-8 (this is what you use on japanwindow.com).

- my web host not supporting Markdown (I use Westhost)
Since you state you are using PHP 5.0.3, I don't think this can be a problem.

- some part of Perl being missing (I have Perl 5.6 or something like that installed)
PHP Markdown doesn't use Perl at all. It's all PHP.

japanwindow
07-08-2005, 02:16 PM
Michel Fortin was kind enough to send me an email. I'm embarassed, because as I suspected the solution was extremely simple. Here's what he wrote:

I think the only way something like this can happen is if Markdown is
processed, then the tags are stripped. I would look in that direction.

(Are you using `<IMAGE_NOTES_CLEAN>` in your PixelPost template instead
of `<IMAGE_NOTES>`?)

I checked, and my template had "Image_Notes_Clean". I don't know if I did that or if it came that way (it's based on the Pepper Template). Anyway, I changed it to "Image_Notes" and everything is working just fine now.

Sorry for the trouble, but now anyone who has this problem in the future can find the answer here. :)

Connie
07-08-2005, 04:47 PM
yes, we all learn from these situations, maybe it would be useful to point out that more explicately in the pixelpost-taglist which is included in the download-package...