[Cpan-forum-commit] rev 82 - in trunk: lib/CPAN lib/CPAN/Forum t
templates
svn at pti.co.il
svn at pti.co.il
Sat Feb 5 01:40:31 IST 2005
Author: gabor
Date: 2005-02-05 01:40:30 +0200 (Sat, 05 Feb 2005)
New Revision: 82
Modified:
trunk/lib/CPAN/Forum.pm
trunk/lib/CPAN/Forum/Markup.pm
trunk/t/010-markup.t
trunk/templates/editor.tmpl
Log:
enable inline tags within <p></p>
Modified: trunk/lib/CPAN/Forum/Markup.pm
===================================================================
--- trunk/lib/CPAN/Forum/Markup.pm 2005-02-04 22:45:31 UTC (rev 81)
+++ trunk/lib/CPAN/Forum/Markup.pm 2005-02-04 23:40:30 UTC (rev 82)
@@ -15,11 +15,17 @@
marked_html: html(s) { qq(<div class="text">) . join("", @{$item[1]}) . qq(</div>); }
html : text { $item[1] }
+ | block { $item[1] }
+ | inline { $item[1] }
+ block : open_p inline(s) close_p { "<p>" . join("", @{$item[2]}) . "</p>" }
+
+
+ inline : text { $item[1] }
| open_b text close_b { join "", @item[1..$#item] }
| open_i text close_i { join "", @item[1..$#item] }
- | open_p text close_p { join "", @item[1..$#item] }
| br { $item[1] }
| open_a text close_a { join "", @item[1..$#item] }
+
br : m{<br( /)?>}i { "<br />" }
open_p : m{<p>}i { "<p>" }
close_p : m{</p>}i { "</p>" }
Modified: trunk/lib/CPAN/Forum.pm
===================================================================
--- trunk/lib/CPAN/Forum.pm 2005-02-04 22:45:31 UTC (rev 81)
+++ trunk/lib/CPAN/Forum.pm 2005-02-04 23:40:30 UTC (rev 82)
@@ -189,6 +189,7 @@
Accept <a href=> tags for http and mailto
Admin page
Admin can change "From" e-address
+ Enable <i>, <b> <br> and <a ..> with <p></p> pairs
Admin can change e-mail address of any user
Modified: trunk/t/010-markup.t
===================================================================
--- trunk/t/010-markup.t 2005-02-04 22:45:31 UTC (rev 81)
+++ trunk/t/010-markup.t 2005-02-04 23:40:30 UTC (rev 82)
@@ -62,6 +62,7 @@
'<A HREF=http://blc>text</a>' => $TEXT . '<a href="http://blc">text</a>' . $END,
'<A HREF="http://bld">text</a>' => $TEXT . '<a href="http://bld">text</a>' . $END,
'<A HREF=mailto:a at b.c>addr</a>' => $TEXT . '<a href="mailto:a at b.c">addr</a>' . $END,
+ '<p>bright <b>new</b> world</p>' => $TEXT . '<p>bright <b>new</b> world</p>' . $END,
);
Modified: trunk/templates/editor.tmpl
===================================================================
--- trunk/templates/editor.tmpl 2005-02-04 22:45:31 UTC (rev 81)
+++ trunk/templates/editor.tmpl 2005-02-04 23:40:30 UTC (rev 82)
@@ -31,7 +31,8 @@
<div class="posting_rules">Posting Rules:</div>
<ul class="postrules">
- <li> Accepted HTML tags are: <b></b>, <i></i>, <p></p>, <br> and <br /></li>
+ <li> Accepted XHTML tags are: <b></b>, <i></i>, <p></p>, <br />, <a href=...>...</a></li>
+ <li> The site also accepts the upper case versions of these tags and turns them into lower case. In addition we accept <br> and turn it into a <br /> during display.</li>
<li> If you'd like to show < > you'll have to type &lt; &gt; repectively</li>
<li> You can use a pseudo markup pair: <code> and </code>. The idea is
that you put your real code in such markup. Including plain <STDIN>
More information about the Cpan-forum-commit
mailing list