[drupal-devel] [bug] Strange markup in book render functions

puregin puregin at puregin.org
Sat May 7 18:55:56 UTC 2005


On 7 May 2005, at 11:40 AM, Steven wrote:

> Issue status update for http://drupal.org/node/1898
>
> Project:      Drupal
> Version:      cvs
> Component:    book.module
> Category:     bug reports
> Priority:     critical
> Assigned to:  puregin
> Reported by:  kika
> Updated by:   Steven
> Status:       patch
>
> Puregin: nope, the code correctly handles missing h numbers. If the 
> book
> page only uses h2, then that will be the first new level. If it uses h2
> and h4, and it is inside a 3rd level book page for example (whose title
> would be h3), they they get renumbered to respectively h4 and h5 (no
> missing number).

I don't think it will handle the case where h2, h3, and  h4 are all used
in the text, but the sequence h2, h4 occurs.  To put it another way,
the problem of checking whether headers are in a legal sequence is
context sensitive, while a regular-expression search and replace (even
if the replacement sequence remaps the targets) is context-free.

Djun




More information about the drupal-devel mailing list