[Pmwiki-users] Some WikiText formatting issues
Patrick R. Michaud
pmichaud at sci.tamucc.edu
Sun May 4 20:47:33 CDT 2003
On Sun, May 04, 2003 at 06:44:16PM -0400, Crisses wrote:
> Is % as in %text% used in a wiki for comments or is there another purpose?
>
> I didn't seen this mentioned in the documentation.
It's a WikiStyle -- see the WikiStyles documentation.
In the Development pages I've defined a %Pm% style that draws the
text in purple. You can see the style definition in the
Development.GroupHeader page.
> Some pages are not displaying properly in my browser. The php seems to be
> rendering the HTML oddly which most browsers correct for, but mine is not,
> apparently (Safari (by Apple), the section renders correctly in Internet
> Explorer for OSX) -- perhaps it is because when using a <p> to render a
> paragraph, technically the paragraph should have a final </p> tag. Most
> browsers forgive this oversight but mine may not be.
Hmm. HTML didn't used to require the </p>, although I know that XHTML does.
I wonder if CustomHeadersAndFooters validates through the W3C MarkUp
Validation Service ... checking ... yup, it does! So, the lack of the
</p> is technically correct, at least from W3C's perspective. I'd blame
Safari at this point for not adhering to the spec. :-)
> One problem I see in the HTML other than the <p>...</p> possibility is
> things like <pre>...</pre>. An entire section is rendered incorrectly into
> HTML:
>
>
> Wikisource:
> For example, if you wanted to add a new cascading stylesheet definition to
> the <HEAD> section of the HTML output, you can do it by adding the following
> to @@local.php@@:
> [=$HTMLHeaderFmt=] .= "<style type='text/css'> .redtext { color:red; }
> </style>";
>
> For...
>
>
> HTMLsource:
> <P>For example, if you wanted to add a new cascading stylesheet definition
> to the <HEAD> section of the HTML output, you can do it by adding the
> following to <code>local.php</code>:
> <PRE > $HTMLHeaderFmt .= "<style type='text/css'> .redtext {
> color:red; } </style>";
>
> </PRE>For...
>
>
> I think the best HTML rendering of this would be:
> <p>For example, if you wanted to add a new cascading stylesheet definition
> to the <HEAD> section of the HTML output, you can do it by adding the
> following to <code>local.php</code>:<br />
> <pre>$HTMLHeaderFmt</pre> .= "<style type='text/css'> .redtext {
> color:red; } </style>";</p>
>
> <p>For...
>
>
> This would start to bring this up to transitional xhtml standards...if
> that's desirable.
Well, I am definitely interested in moving towards transitional xhtml
standards, depending on the level of support it has in popular browsers.
However, I disagree slightly with your rendering, I think it should
be:
<p>For example, if you wanted to add a new cascading stylesheet definition
to the <HEAD> section of the HTML output, you can do it by adding the
following to <code>local.php</code>:</p>
<pre>$HTMLHeaderFmt .= "<style type='text/css'> .redtext {
color:red; } </style>";</pre>
<p>For...
Because the wiki markup was indented by spaces, the entire $HTMLHeaderFmt
line has to be part of the <pre>...</pre>. Whether the <pre> should
be nested inside the paragraph or not is definitely an open question.
And believe it or not, dealing with the paragraph tags is
probably one of the most tricky and difficult pieces of the rendering
engine, and I still find places where it still doesn't to do exactly
what it should. One of these days I'll probably have to rework that
whole section of the code, but it is really hairy to keep track of all
of that...
Thanks for your excellent work and comments!
Pm
More information about the pmwiki-users
mailing list