You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "brushed (JIRA)" <ji...@apache.org> on 2017/04/25 19:30:04 UTC

[jira] [Commented] (JSPWIKI-1040) Add new markup (%%% ... /%%) for marking plain-text sections

    [ https://issues.apache.org/jira/browse/JSPWIKI-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983485#comment-15983485 ] 

brushed commented on JSPWIKI-1040:
----------------------------------

The way this basically would work is by converting this markup

{noformat}
%%%some-style
....
/%
{noformat}

into this html

{code:xml}
 <pre class="some-style">
   ...
 </pre>
{code}

Also this markup would be supported :
{noformat}
%%%(color:red; border:2px solid black;)
....
/%
{noformat}
and this:
{noformat}
%%%style1.style2
....
/%
{noformat}


> Add new markup (%%% ... /%%) for marking plain-text sections 
> -------------------------------------------------------------
>
>                 Key: JSPWIKI-1040
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1040
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Core & storage
>            Reporter: brushed
>            Priority: Minor
>
> JSPWiki uses the following pattern to mark a block of text,  to apply different styles  (eg. %%info)  or as a trigger for a javascript handler adding certain behaviour (eg. %%viewer)
> {noformat}
> %%<some-marker>    ...   /%  
> {noformat}
> Note that the text inside the %% block continues to be parsed as regular JSPWiki text. (eg. \[links] are properly converted to <a>; explicit line-breaks,  etc...)
> For some use-cases, it would be convenient to be able to mark certain sections in a page indicating that the text inside the section should NOT be  parsed by JSPWiki.   
> This is similar to a pre-formatted text block enclosed in triple curly braces  but then with different styling.
> Today's workaround is to try to escape any possible markup conflict (with tilde character) or to combine both syntaxes like this:
> {noformat}
> %%<some-marker>
> {{{
> ...
> }}}
> /%
> {noformat}
> Both solutions are cumbersome and not trivial to the user.
> ----
> The proposed syntax is to use a triple % sign:
> {noformat}
> %%%<some-marker>
> .... plain vanilla text, remains unparsed by jsp-wiki
> /%%
> {noformat}
> Example use-case:
> - mark a block of Tex/LaTeX syntax,  and have some JS to render the math
> - add an exotic markup language converter written in javascript  (markdown, pod, ...)
> - etc. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)