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

Italics XWiki syntax

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Minor
    • 1.3 M2
    • None
    • {Unused} Wiki features
    • None
    • Unit

    Description

      The italics wiki markup is triggered by placing a piece of text inside double-tilde, like: ~~text~~. This filter only works in single line mode.

      It generates markup specifying that the delimited text is empahised; in XHTML the <em> tag is used.

      Expected behavior:

      This is not ~~ italic ~~  => This is not ~~ italic ~~
      This is not ~~italic ~~  => This is not ~~italic ~~
      This is not ~~ italic~~  => This is not ~~ italic~~
      This is ~~italic~~ => This is <em>italic</em>
      This is ~~a~~ letter italic => This is <em>a</em> letter italic
      This is ~~a~~ short italic~~ => This is <em>a</em> short italic~~
      This is ~~all ~~ italic~~ => This is <em>all ~~ italic</em>
      This is ~~all ~~italic~~ => This is <em>all ~~italic</em>
      This is ~~one~~italic~~ => This is <em>one</em>italic~~
      ~~a~~ => <em>a</em>
      More ~~italics~~ on a ~~line~~ => More <em>italics</em> on a <em>line</em>
      The extra tilde are ~~~~inside~~~ => The extra tilde are <em>~~inside~</em>
      This~~is~~italic => This<em>is</em>italic
      ~~Eeny~~meeny~~miny~~moe~~ => <em>Eeny</em>meeny<em>miny</em>moe~~
      ~~ Eeny~~meeny~~miny~~moe~~ => ~~ Eeny<em>meeny</em>miny<em>moe</em>
      This is an italic ~~~~~~ text => This is an italic <em>~~</em> text
      Ignore ~~things~~ inside <script> var s = "non ~~italic~~ text"; </script> => Ignore <em>things</em> inside <script> var s = "non ~~italic~~ text"; </script>
      Ignore <a href="/some~~page~~with~~tilde">attributes</a> => Ignore <a href="/some~~page~~with~~tilde">attributes</a>
      
      Multiline examples:
      This is not ~~not
      italic~~
       =>
      This is not ~~not
      italic~~
      
      <script>
      var s = "non ~~italic~~ text";
      </script>
      var s = "non ~~italic~~ text"; 
       =>
      <script>
      var s = "non ~~italic~~ text";
      </script>
      var s = "non <em>italic</em> text";
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: