FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=12567&edit=1

ID: 12567
Updated by: daniel.oconnor@gmail.com
Reported By: ntd at entidi dot it
Summary: XHTML rendering of Toc using nested <ul>s
Status: Assigned
Type: Feature/Change Request
Package: Text_Wiki
Operating System: All
Package Version: 1.2.0
PHP Version: Irrelevant
Assigned To: justinpatrin
Roadmap Versions:
New Comment:

clockwerx@clockwerx-desktop:~/pear-svn-git/Text_Wiki$ patch -p1 <
patch-
download.php\?id\=12567\&patch\=use_ul\&revision\=1196591285
patching file Text/Wiki/Render/Xhtml/Toc.php
Hunk #1 FAILED at 30.
Hunk #2 succeeded at 51 (offset 1 line).
Hunk #3 FAILED at 84.
2 out of 3 hunks FAILED -- saving rejects to file
Text/Wiki/Render/Xhtml/Toc.php.rej


Previous Comments:
------------------------------------------------------------------------

[2010-03-08 13:45:47] doconnor

1. Any chance of this patch without the 'static' behaviour?
2. Can you provide any Unit test coverage?

------------------------------------------------------------------------

[2007-12-02 05:09:08] ntd

Description:
------------
This patch adds a 'use_ul' configuration flag that, if enabled, renders
the Toc as a series of nested <ul>s. This allows more customization
control, such as setting the indentation, rendering items on a per-level
base or adding
JavaScript stuff to show/hide sublevels in complex tocs.

If 'use_ul' is false (default), it follows the old behaviour.

Test script:
---------------
[[toc]]

++ Header 2
+++ Header 3
++++ Header 4
++ Header 2
+++ Header 3

Expected result:
----------------
<div id="idToc">
<ul>
<li><a href="#toc0">Header 2</a>
<ul>
<li><a href="#toc1">Header 3</a>
<ul>
<li><a href="#toc2">Header 4</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#toc3">Header 2</a>
<ul>
<li><a href="#toc4">Header 3</a></li>
</ul>
</li>
</ul>
</div>

------------------------------------------------------------------------

Search Discussions

  • Daniel Oconnor at Jan 2, 2012 at 12:58 am
    Edit report at https://pear.php.net/bugs/bug.php?id=12567&edit=1

    ID: 12567
    Updated by: daniel.oconnor@gmail.com
    Reported By: ntd at entidi dot it
    Summary: XHTML rendering of Toc using nested <ul>s
    -Status: Assigned
    +Status: Feedback
    Type: Feature/Change Request
    Package: Text_Wiki
    Operating System: All
    Package Version: 1.2.0
    PHP Version: Irrelevant
    Assigned To: justinpatrin
    Roadmap Versions:
    New Comment:

    -Status: Assigned
    +Status: Feedback
    Need a new patch


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-01-02 01:57:53] doconnor

    clockwerx@clockwerx-desktop:~/pear-svn-git/Text_Wiki$ patch -p1 <
    patch-
    download.php\?id\=12567\&patch\=use_ul\&revision\=1196591285
    patching file Text/Wiki/Render/Xhtml/Toc.php
    Hunk #1 FAILED at 30.
    Hunk #2 succeeded at 51 (offset 1 line).
    Hunk #3 FAILED at 84.
    2 out of 3 hunks FAILED -- saving rejects to file
    Text/Wiki/Render/Xhtml/Toc.php.rej

    ------------------------------------------------------------------------

    [2010-03-08 13:45:47] doconnor

    1. Any chance of this patch without the 'static' behaviour?
    2. Can you provide any Unit test coverage?

    ------------------------------------------------------------------------

    [2007-12-02 05:09:08] ntd

    Description:
    ------------
    This patch adds a 'use_ul' configuration flag that, if enabled, renders
    the Toc as a series of nested <ul>s. This allows more customization
    control, such as setting the indentation, rendering items on a per-level
    base or adding
    JavaScript stuff to show/hide sublevels in complex tocs.

    If 'use_ul' is false (default), it follows the old behaviour.

    Test script:
    ---------------
    [[toc]]

    ++ Header 2
    +++ Header 3
    ++++ Header 4
    ++ Header 2
    +++ Header 3

    Expected result:
    ----------------
    <div id="idToc">
    <ul>
    <li><a href="#toc0">Header 2</a>
    <ul>
    <li><a href="#toc1">Header 3</a>
    <ul>
    <li><a href="#toc2">Header 4</a></li>
    </ul>
    </li>
    </ul>
    </li>
    <li><a href="#toc3">Header 2</a>
    <ul>
    <li><a href="#toc4">Header 3</a></li>
    </ul>
    </li>
    </ul>
    </div>

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 2, '12 at 12:57a
activeJan 2, '12 at 12:58a
posts2
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 2 posts

People

Translate

site design / logo © 2021 Grokbase