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

Probable mistake in strikethrough regular expression match

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 1.2 M1
    • 1.0 B5
    • {Unused} Rendering 1.0
    • None
    • regular expression, strikethrough, radeox

    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

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

            Dates

              Created:
              Updated:
              Resolved: