OSDN Git Service
(root)
/
pukiwiki
/
pukiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9efb23d
)
BugTrack/2283 ls2 plugin: Fix heading listing level
author
umorigu
<umorigu@gmail.com>
Fri, 27 Oct 2017 15:05:04 +0000
(
00:05
+0900)
committer
umorigu
<umorigu@gmail.com>
Fri, 27 Oct 2017 15:05:04 +0000
(
00:05
+0900)
plugin/ls2.inc.php
patch
|
blob
|
history
diff --git
a/plugin/ls2.inc.php
b/plugin/ls2.inc.php
index
3572b68
..
3ea84fb
100644
(file)
--- a/
plugin/ls2.inc.php
+++ b/
plugin/ls2.inc.php
@@
-153,9
+153,9
@@
function plugin_ls2_get_headings($page, & $params, $level, $include = FALSE)
foreach (get_source($page) as $line) {
if ($is_title && preg_match('/^(\*{1,3})/', $line, $matches)) {
$id = make_heading($line);
foreach (get_source($page) as $line) {
if ($is_title && preg_match('/^(\*{1,3})/', $line, $matches)) {
$id = make_heading($line);
- $level = strlen($matches[1]);
+ $
heading_
level = strlen($matches[1]);
$id = PLUGIN_LS2_ANCHOR_PREFIX . $anchor++;
$id = PLUGIN_LS2_ANCHOR_PREFIX . $anchor++;
- plugin_ls2_list_push($params, $level +
strlen($level)
);
+ plugin_ls2_list_push($params, $level +
$heading_level
);
array_push($params['result'],
'<li><a href="' . $href . $id . '">' . $line . '</a>');
} else if ($is_include &&
array_push($params['result'],
'<li><a href="' . $href . $id . '">' . $line . '</a>');
} else if ($is_include &&