OSDN Git Service

listプラグインのプログラムを<<<...>>>で囲むと囲んだ部分を強調して表示するようにした。
authortakezoe <takezoe@871d6764-1e22-0410-b313-a55050885396>
Wed, 23 Nov 2011 01:39:46 +0000 (01:39 +0000)
committertakezoe <takezoe@871d6764-1e22-0410-b313-a55050885396>
Wed, 23 Nov 2011 01:39:46 +0000 (01:39 +0000)
takezoe/plugin/book/Install.pm
takezoe/plugin/book/List.pm
takezoe/plugin/book/README.txt

index 8fda54a..163b7ef 100644 (file)
@@ -199,6 +199,13 @@ table.box p {
   margin-left: 0px;
   padding-left: 0px;
 }
+
+pre.prettyprint strong {
+  background-color: #444444;
+  text-decoration: underline;
+#  border: 1px solid gray;
+  font-weight: normal;
+}
 </style>
 END_OF_HEAD
        
index cb4a4f7..615635e 100644 (file)
@@ -23,6 +23,9 @@
 # &nbsp;&nbsp;&nbsp;&nbsp;System.out.println("Hello World!");
 # &nbsp;&nbsp;}
 # }
+# <p>
+#   ¤Þ¤¿¡¢¥×¥í¥°¥é¥à¤ò&lt;&lt;&lt;...&gt;&gt;&gt;¤Ç°Ï¤à¤È°Ï¤ó¤ÀÉôʬ¤¬¶¯Ä´¤·¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£
+# </p>
 # </pre>
 #
 ################################################################################
@@ -33,7 +36,6 @@ package plugin::book::List;
 sub new {
        my $class = shift;
        my $self = {};
-       $self->{'count'} = 0;
        return bless $self,$class;
 }
 
@@ -46,7 +48,10 @@ sub block {
        my $code = shift;
        my $buf  = '';
        
-       return $buf.'<pre class="prettyprint">'.Util::escapeHTML($code).'</pre>';
+       $code = Util::escapeHTML($code);
+       $code =~ s/&lt;&lt;&lt;((.|\s)+?)&gt;&gt;&gt;/<strong>$1<\/strong>/g;
+       
+       return $buf.'<pre class="prettyprint">'.$code.'</pre>';
 }
 
 1;
index 9ce0026..0b203cb 100644 (file)
@@ -38,6 +38,8 @@ FSWiki
  }
  }}
 
+¤Þ¤¿¡¢¥½¡¼¥¹Æâ¤ò<<< ... >>>¤Ç°Ï¤à¤È¡¢°Ï¤ó¤ÀÉôʬ¤¬¶¯Ä´¤µ¤ì¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£
+
 !!¿ÞɽÈÖ¹æ
 
 caption¥×¥é¥°¥¤¥ó¤ò»ÈÍѤ¹¤ë¤È¿ÞɽÈÖ¹æ¤òÉÕÍ¿¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Âè°ì°ú¿ô¤Ë¼ïÊÌ¡Êɽ¡¢¿Þ¡¢¥ê¥¹¥È¤Ê¤É¡Ë¡¢ÂèÆó°ú¿ô¤Ë¥­¥ã¥×¥·¥ç¥ó¤Ëɽ¼¨¤¹¤ëʸ»úÎó¤ò»ØÄꤷ¤Þ¤¹¡£