-27,6 +27,56 |
=== 추가 업데이트 내역 === |
|
=== 사용자 의견 === |
|
wikicreole markup suggested (in coexistence with earlier markup). \\ |
First of all, I'm not sure where the exact site for cutting regular expresion at "/(^[ \t]*(\=+)\s+[^\n]+\s+\=+\s*$)/", but works fine by now. \\ |
<pre> \\ |
sub DoEdit { \\ |
- while ($temp_text =~ /(^[ \t]*(\=+)\s+[^\n]+\s+\=+\s*$)/gm) { \\ |
+ while ($temp_text =~ /(^[ \t]*(\=+)\s+[^\n]*$)/gm) { \\ |
$num++; \\ |
$h_pos[$num] = pos($temp_text) - length($1); \\ |
$h_depth[$num] = length($2); \\ |
if ($num == $section) { # summary \\ |
my $h_str = $1; \\ |
\\ |
- $h_str =~ /^[ \t]*\=+\s+(#\s+)?([^\n]+)\s+\=+\s*$/; \\ |
+ $h_str =~ /^[ \t]*\=+\s+(#\s+)?([^\n]+)\s+\s*$/; \\ |
$h_str = $2; \\ |
+ # suppress the "=" series on the right of header \\ |
+ $h_str =~ s/(\=+)?//g; \\ |
+ # suppress possible blank before the "=" series on the right of header \\ |
+ $h_str =~ s/( +)?$//g; \\ |
$h_str =~ s/"/"/g; \\ |
$q->param("summary", "$h_str - " \\ |
. &GetParam("summary", "")) unless $preview || $saveEdit; \\ |
$header .= '. ' . T('Section') . '=' . $num . ': ' . $h_str ; \\ |
} \\ |
} \\ |
.... \\ |
sub CommonMarkup { \\ |
s/(^|\n)\s*(\=+)\s+([^\n]+)\s+\=+/&WikiHeading($1, $2, $3)/geo; \\ |
+ # creole heading \\ |
+ s/(^|\n)\s*(\=+)\s+([^\n]+)/&WikiHeading($1, $2, $3)/geo; \\ |
... \\ |
sub DoPostMain { \\ |
... \\ |
- while ($temp_text =~ /(^[ \t]*(\=+)\s+[^\n]+\s+\=+\s*$)/gm) { \\ |
+ while ($temp_text =~ /(^[ \t]*(\=+)?\s+[^\n]*$)/gm) { \\ |
\\ |
End. <mysign([[JuanmaMP]],2012-7-11 11:17 am)> |
|
Hi Raymundo, one more suggestion not a request |
|
{{{#!vim perl |
sub WikiHeading { |
... |
- $edit_section = '' if (&GetParam("embed", $EmbedWiki)); |
+ $edit_section = $SectionNumber if (&GetParam("embed", $EmbedWiki)); |
... |
} |
}}} |
Thanks ... <mysign([[JuanmaMP]],2013-5-12 6:29 am)> |
<longcomments(UseModWiki소스수정/WikiHeading,100)> |
---- |
[[위키위키분류]] |