'**' doesn't work properly

Amitaibu - October 21, 2007 - 16:33
Project:Custom filter
Version:5.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

User enters:

test
* List 1
* List 2
** List 2.1

and gets snap1.png

btw, why does the module add 'Table of contents'? I think it's redundant...

AttachmentSize
Snap1_16.png2.71 KB

#1

arhip - October 21, 2007 - 22:03

Thanks. I've tried the input provided, and I get the same result too. And I get the same error message you post before: http://drupal.org/node/185333 The error is not in the module, but in the sample filter MediaWiki. I'm working on it, and I will fix soon.

The table of contents only used for demonstration purpose only. You can delete this filter.

#2

arhip - October 22, 2007 - 11:00

I've found the problem. The Mediawiki/unordered list filter uses this regex:

  /^(\*+)(.*?)$/m

When modifier m used, $ will match newline character. I try your input and get an unexpected result, because the last line "** List 2.1" doesn't followed by a newline character. You need to give an "enter" after the last line, for the filter work correctly.

test
* List 1
* List 2
** List 2.1   <-- "enter" here
  <-- so here will be a newline

#3

kiamlaluno - July 1, 2009 - 15:17
Category:bug report» support request
Status:active» fixed

The sample filters are provided as bases to create custom filters. Users are free to modify them basing on their needs.

#4

kiamlaluno - July 1, 2009 - 17:51

The sample filters are provided as base to create custom filters. Users are free to modify them basing on their needs.

#5

System Message - July 15, 2009 - 18:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.