Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-1023

Probable mistake in strikethrough regular expression match

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 B5
    • Fix Version/s: 1.2 M1
    • Component/s: {Unused} Rendering 1.0
    • Labels:
      None
    • keywords:
      regular expression, strikethrough, radeox
    • Similar issues:

      Description

      In file radeox_markup_xwiki.properties the regular expression that matches the strikethrough seems incomplete/wrong:

       
      (?<!!)--(([^\\p{Space}])|([^\\p{Space}].*?[^\\p{Space}]))--(?!-)
      
      Indeed this expression will match the following input  "---something--"
      
      Shouldn't the first look-behind be "(?<!-)"  ?
      
      Maybe this lookahead is to avoid matching html comments <!-- -->, in this case we should write something like this:
      (?<!!)((?<!-)--) etc...
      
      

        Attachments

          Activity

            People

            Assignee:
            sdumitriu Sergiu Dumitriu
            Reporter:
            oliveira Pablo Oliveira
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: