[ 
http://jira.xwiki.org/jira/browse/XWIKI-1245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergiu Dumitriu closed XWIKI-1245.
----------------------------------

    Fix Version/s: 1.3 M2
            Tests: [Unit]
       Resolution: Fixed
         Assignee: Sergiu Dumitriu

The syntax works as proposed, with the following remarks:
- Filtering out links and scripts is not implemented, as it increases the 
rendering time a lot in some usage scenarios. This should be fixed when 
switching to the new rendering engine.
- Works on a single line only.
- Regex should run in O(n*m) whatever the text, where n=<text length> and 
m=<number of ~~ occurrences>


> Italics XWiki syntax
> --------------------
>
>                 Key: XWIKI-1245
>                 URL: http://jira.xwiki.org/jira/browse/XWIKI-1245
>             Project: XWiki Core
>          Issue Type: Task
>          Components: Wiki features
>            Reporter: Sergiu Dumitriu
>         Assigned To: Sergiu Dumitriu
>            Priority: Minor
>             Fix For: 1.3 M2
>
>
> 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:
> {noformat}
> 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";
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.xwiki.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to