This is an automated email from the ASF dual-hosted git repository.

juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git

commit cc59143f48810b52fbb9c35d43f4862ce70602eb
Author: Juan Pablo Santos Rodríguez <[email protected]>
AuthorDate: Tue Mar 22 11:47:08 2022 +0100

    JSPWIKI-802: move Wiki.Snips.js to modules with specific wiki syntaxes
---
 jspwiki-main/pom.xml                               |  19 +++
 .../src/main/javascript/Wiki.Snips.JSPWiki.js      |   8 +-
 jspwiki-main/src/main/javascript/wro.properties    |  24 ++++
 jspwiki-main/src/main/javascript/wro.xml           |  28 +++++
 jspwiki-markdown/pom.xml                           |  23 ++++
 .../src/main/javascript/Wiki.Snips.Markdown.js     | 134 ++++++++++-----------
 .../src/main/javascript/wro.properties             |  24 ++++
 jspwiki-markdown/src/main/javascript/wro.xml       |  28 +++++
 jspwiki-war/src/main/config/wro/wro-haddock.xml    |   5 +-
 9 files changed, 220 insertions(+), 73 deletions(-)

diff --git a/jspwiki-main/pom.xml b/jspwiki-main/pom.xml
index 0614605..00ac75f 100644
--- a/jspwiki-main/pom.xml
+++ b/jspwiki-main/pom.xml
@@ -299,6 +299,25 @@
           </includes>
         </configuration>
       </plugin>
+
+      <plugin>
+        <groupId>ro.isdc.wro4j</groupId>
+        <artifactId>wro4j-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>buildPlainEditorSyntaxJS</id>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              
<extraConfigFile>${project.basedir}/src/main/javascript/wro.properties</extraConfigFile>
+              
<jsDestinationFolder>${project.build.outputDirectory}/META-INF/resources/plain/</jsDestinationFolder>
+              <wroFile>src/main/javascript/wro.xml</wroFile>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js 
b/jspwiki-main/src/main/javascript/Wiki.Snips.JSPWiki.js
similarity index 99%
copy from jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js
copy to jspwiki-main/src/main/javascript/Wiki.Snips.JSPWiki.js
index cf57417..43f4d6b 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js
+++ b/jspwiki-main/src/main/javascript/Wiki.Snips.JSPWiki.js
@@ -31,7 +31,7 @@ Wiki.DirectSnips = {
     "'" : {
         snippet: "'",
         scope: {
-            "[{" : "}]"  //plugin parameters
+            "[{" : "}]"  // plugin parameters
           }
         }
 };
@@ -138,8 +138,8 @@ Wiki.Snips = {
     fontDlg: {
         scope: { "%%(":")" },
         suggest: {
-        lback: "font-family:([^;\\)\\n\\r]*)$",
-        match:"^([^;\\)\\n\\r]*)"
+          lback: "font-family:([^;\\)\\n\\r]*)$",
+          match:"^([^;\\)\\n\\r]*)"
         },
         fontDlg: [Dialog.Font, {}]
     },
@@ -620,7 +620,7 @@ Wiki.Snips = {
                 "divider-code": "",
                     "\n{{{\n/* code block */\n{code block}\n}}}\n": "<span 
class='small' style='font-family:monospace;'>&lt;/&gt;</span>",
                     "\n%%prettify\n{{{\n{pretiffied code block}\n}}}/%\n": 
"<span class='small' 
style='font-family:monospace;color:green;'>&lt;/&gt;</span>",
-                    "\n%%scrollable\n{{{\n{code block}\n}}}/%\n": 
"&darr;&uarr;"
+                    "\n%%scrollable\n{{{\n{scrollable code block}\n}}}/%\n": 
"&darr;&uarr;"
                 });
             }
 
diff --git a/jspwiki-main/src/main/javascript/wro.properties 
b/jspwiki-main/src/main/javascript/wro.properties
new file mode 100644
index 0000000..0a5b33b
--- /dev/null
+++ b/jspwiki-main/src/main/javascript/wro.properties
@@ -0,0 +1,24 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+#minimizeEnabled=false
+debug=true
+
+
+preProcessors=semicolonAppender
+postProcessors=uglifyJs
+
diff --git a/jspwiki-main/src/main/javascript/wro.xml 
b/jspwiki-main/src/main/javascript/wro.xml
new file mode 100644
index 0000000..76603b4
--- /dev/null
+++ b/jspwiki-main/src/main/javascript/wro.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<groups xmlns="http://www.isdc.ro/wro";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://www.isdc.ro/wro wro.xsd">
+
+  <group name="wiki-snips-jspwiki">
+    <js>/javascript/Wiki.Snips.JSPWiki.js</js>
+  </group>
+
+</groups>
\ No newline at end of file
diff --git a/jspwiki-markdown/pom.xml b/jspwiki-markdown/pom.xml
index a81ea80..bdbc58a 100644
--- a/jspwiki-markdown/pom.xml
+++ b/jspwiki-markdown/pom.xml
@@ -133,4 +133,27 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>ro.isdc.wro4j</groupId>
+        <artifactId>wro4j-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>buildPlainEditorSyntaxJS</id>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              
<extraConfigFile>${project.basedir}/src/main/javascript/wro.properties</extraConfigFile>
+              
<jsDestinationFolder>${project.build.outputDirectory}/META-INF/resources/plain/</jsDestinationFolder>
+              <wroFile>src/main/javascript/wro.xml</wroFile>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
\ No newline at end of file
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js 
b/jspwiki-markdown/src/main/javascript/Wiki.Snips.Markdown.js
similarity index 83%
rename from jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js
rename to jspwiki-markdown/src/main/javascript/Wiki.Snips.Markdown.js
index cf57417..6a9f757 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js
+++ b/jspwiki-markdown/src/main/javascript/Wiki.Snips.Markdown.js
@@ -31,7 +31,7 @@ Wiki.DirectSnips = {
     "'" : {
         snippet: "'",
         scope: {
-            "[{" : "}]"  //plugin parameters
+            "[{" : "}]()"  // plugin parameters
           }
         }
 };
@@ -62,7 +62,7 @@ Wiki.Snips = {
     // Simple shortcuts
     br: {
         key: "shift+enter",
-        snippet: "\\\\\n"
+        snippet: "&nbsp;&nbsp;\n"
     },
     hr: "\n----\n",
     lorem: "This is just some sample. Don’t even bother reading it; you will 
just waste your time. Why do you keep reading? Do I have to use Lorem Ipsum to 
stop you? OK, here goes: Lorem ipsum dolor sit amet, consectetur adipi sicing 
elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Still 
reading? Gosh, you’re impossible. I’ll stop here to spare you.",
@@ -70,26 +70,26 @@ Wiki.Snips = {
 
 
     // simple inline tab completion commands
-    bold:   { key: "b", snippet: "__{bold}__" },
-    italic: { key: "i", snippet: "''{italic}''" },
+    bold:   { key: "b", snippet: "**{bold}**" },
+    italic: { key: "i", snippet: "_{italic}_" },
 
-    mono:   { key: "m", snippet: "{{{monospaced text}}} " },
-    sub:    "%%sub {subscript text}/% ",
-    sup:    "%%sup {superscript text}/% ",
-    strike: "%%strike {strikethrough text}/% ",
+    mono:   { key: "m", snippet: "``monospaced text`` " },
+    sub:    "<!----> {subscript text}{.sub} ",
+    sup:    "<!----> {superscript text}{.sup} ",
+    strike: "<!----> {strikethrough text}{.strike} ",
 
     // simple block tab completion commands
-    quote:  "\n%%quote\n{Quoted text}\n/%\n",
-    dl:     "\n;{term}:definition-text ",
+    quote:  "\n> {Quoted text}\n",
+    dl:     "\n{term}\n: definition-text ",
     def: { alias: "dl" },
-    pre:    "\n{{{\n{some preformatted block}\n}}}\n",
-    code:   "\n%%prettify \n{{{\n{/* some code block */}\n}}}\n/%\n",
-    table:  "\n||{heading-1} ||heading-2\n|cell11     |cell12\n|cell21     
|cell22\n",
+    pre:    "\n```\n{some preformatted block}\n```\n",
+    code:   "\n```\n{/* some code block */}\n```{.prettify}\n/%\n",
+    table:  "\n|{heading-1} |heading-2\n|--- |---\n|cell11     
|cell12\n|cell21     |cell22\n",
 
     me: { alias: "sign"},
     sign: function(){
         var name = Wiki.UserName || 'UserName';
-        return "\n%%signature\n" + name + ", "+ new Date().toISOString() + 
"\n/%\n";
+        return "\n<!----> " + name + ", "+ new Date().toISOString() + 
"{.signature}\n";
     },
 
     now: { alias: "date" },
@@ -104,50 +104,50 @@ Wiki.Snips = {
 
     tabs: {
         nScope: {
-            "%%(":")",
-            "%%tabs":"/%"
+            "\n":" { style='\\w+' }",
+            "\n":"{.tabs}"
         },
-        snippet:"%%tabs\n!tab-1\ntab-1 content 1\n!tab-2\ntab-2 content \n/%\n 
"
+        snippet:"\n\n!tab-1\ntab-1 content 1\n!tab-2\ntab-2 content 
\n{.tabs}\n "
     },
 
     insertPageDlg:{
-        scope: { "[{InsertPage":"}]" },
+        scope: { "[{InsertPage":"}]()" },
         suggest: { lback:"page='([^']*)'?$", match: "^([^']*)" },
         insertPageDlg: Wiki.pageDialog("Insert Page", "/search/suggestions")
     },
 
-    img: "\n[{Image src='{img.jpg}' width='400px' height='300px' align='left' 
}]\n ",
+    img: "\n[{Image src='{img.jpg}' width='400px' height='300px' align='left' 
}]()\n ",
 
     imgSrcDlg:{
-        scope: { "[{Image":"}]" },
+        scope: { "[{Image":"}]()" },
         suggest: { lback:"src='([^']*)'?$", match: "^([^']*)" },
         imgSrcDlg: Wiki.pageDialog("Image", "/search/suggestions")
     },
 
     imgAlignDlg: {
-        scope: { "[{Image":"}]" },
+        scope: { "[{Image":"}]()" },
         suggest: "align='\\w+'",
         imgAlignDlg: "left|center|right"
     },
 
     font: {
-        nScope: { "%%(":")" },
-        snippet: "%%(font-family:{font};) body /% "
+        nScope: { "<!---->":" { style='font-family:\\w+;' }" },
+        snippet: "\n body { style='font-family:'{font};' } "
     },
 
     fontDlg: {
-        scope: { "%%(":")" },
+        scope: { "<!---->":" { style='font-family:\\w+;' }" },
         suggest: {
-        lback: "font-family:([^;\\)\\n\\r]*)$",
-        match:"^([^;\\)\\n\\r]*)"
+          lback: "font-family:([^;\\)\\n\\r]*)$",
+          match:"^([^;\\)\\n\\r]*)"
         },
         fontDlg: [Dialog.Font, {}]
     },
 
-    color: "%%(color:{#000000}; background:#ffffff;) ${some text} /%",
+    color: "<!----> ${some text} { style='color:{#000000}; 
background:#ffffff;' }'",
 
     colorDlg: {
-        scope: { '%%(': ')' },
+        scope: { '<!---->': " { style='color:\\w+;' }" },
         //  /\B#(?:[0-9a-f]{3}){1,2}\b/i
         suggest:"\B#(?:[0-9a-f]{3}){1,2}\b",
         colorDlg: [ Dialog.Color , {} ]
@@ -166,9 +166,9 @@ Wiki.Snips = {
         }]
     },
 
-    icon: "%%icon-{!search} /%",
+    icon: "<!----> {.icon-{!search} }",
     iconDlg: {
-        scope: { "%%":"/%" },
+        scope: { "<!---->":"{.icon-\\w+ }" },
         suggest: "icon-\\S*",
         iconDlg: [Dialog.Selection, {
         cssClass:".dialog-horizontal.icons",
@@ -186,7 +186,7 @@ Wiki.Snips = {
     },
 
     textDlg: {
-        scope: { "%%":" " },
+        scope: { "{.":"}" },
         suggest: {
             lback: /(:?%%|\.)text-(\w*)$/,
             //match: 
"^default|success|info|warning|danger|capitalize|lowercase|uppercase|smallcaps"
@@ -222,7 +222,7 @@ Wiki.Snips = {
     },
 
     contextBG: {
-        scope: { "%%":" " },
+        scope: { "{.":"}" },
         suggest: {
             //lback: /%%(default|success|info|warning|error)$/,
             //match: /^\w+/
@@ -242,7 +242,7 @@ Wiki.Snips = {
     },
 
     bgColorDlg: {
-        scope: { "%%":" " },
+        scope: { "{.":"}" },
         suggest: {
         lback: /(:?%%|\.)bg-(\w*)$/,
         match: /^\w*/
@@ -280,7 +280,7 @@ Wiki.Snips = {
     },
 
     bgDlg: {
-        scope: { "%%bg.":" " },
+        scope: { "{.bg.":"}" },
         suggest: {
         lback: /(:%%bg\.|\.?)(\w*)$/,
         //match: "^default|success|info|warning|danger"
@@ -307,7 +307,7 @@ Wiki.Snips = {
     },
 
     labelDlg: {
-        scope: { "%%":"/%" },
+        scope: { "{.":"}" },
         suggest: {
         lback: /%%label-(\w*)$/,
         //match: "^default|success|info|warning|danger"
@@ -327,7 +327,7 @@ Wiki.Snips = {
     },
 
     listDlg: {
-        scope: { "%%list-":"/%" },
+        scope: { "{.list-":"}" },
         suggest: {lback: "list-(?:[\\w-]+-)?(\\w*)$", match: "^\\w*" },
         listDlg: [Dialog.Selection, {
         cssClass:".dialog-horizontal",
@@ -336,7 +336,7 @@ Wiki.Snips = {
     },
 
     tableDlg: {
-        scope: { "%%table-":"/%" },
+        scope: { "{.table-":"}" },
         suggest: {lback: "table-(?:[\\w-]+-)?(\\w*)$", match: "^\\w*" },
         tableDlg: [Dialog.Selection, {
         cssClass:".dialog-horizontal",
@@ -345,7 +345,7 @@ Wiki.Snips = {
     },
 
     cssDlg: {
-        scope: { "%%":" " },
+        scope: { "{.":"}" },
         suggest: {lback:"(:?%%|\\.)([\\da-zA-Z-_]*)$", 
match:"^[\\da-zA-Z-_]*"},
         cssDlg: [Dialog.Selection, {
         caption: "dialog.styles".localize(),
@@ -392,7 +392,7 @@ Wiki.Snips = {
     link: {
         key:'l',
         wysiwyg:'createlink',
-        snippet: "[description|{pagename or url}|link-attributes] "
+        snippet: "[description](pagename or url){link-attributes} "
     },
 
 
@@ -444,17 +444,17 @@ Wiki.Snips = {
 
 
     variableDlg: {
-        scope:{ '[{$':'}]'},
+        scope:{ '[{$':'}]()'},
         suggest: "\\w+",
         variableDlg: 
"applicationname|baseurl|encoding|inlinedimages|interwikilinks|jspwikiversion|loginstatus|uptime|pagename|pageprovider|pageproviderdescription|page-styles|requestcontext|totalpages|username"
     },
 
     // Page access rights
     allow: { alias: "acl" },
-    acl: "\n[{ALLOW {permission} principal }]\n",
+    acl: "\n[{ALLOW {permission} principal }]()\n",
 
     permission: {
-        scope:{ '[{ALLOW':'}]'},
+        scope:{ '[{ALLOW':'}]()'},
         suggest: { lback:"ALLOW (\\w*)$", match:"^\\w+" },
         permission: [Dialog.Selection, {
             caption: "dialog.permission".localize(),
@@ -463,7 +463,7 @@ Wiki.Snips = {
         }]
     },
     principal: {
-        scope:{ '[{ALLOW':'}]'},
+        scope:{ '[{ALLOW':'}]()'},
         suggest: { lback:"ALLOW \\w+ (?:[\\w,]+,)?(\\w*)$", match:"^\\w*" },
 
         principal: [ Dialog.Selection, {
@@ -473,7 +473,7 @@ Wiki.Snips = {
 
             new Request({
             url: Wiki.XHRPreview,
-            data: { page: Wiki.PageName, wikimarkup: "[{Groups}]" },
+            data: { page: Wiki.PageName, wikimarkup: "[{Groups}]()" },
             onSuccess: function(responseText){
 
                 var body = "Anonymous|Asserted|Authenticated|All";
@@ -491,12 +491,12 @@ Wiki.Snips = {
     },
 
     toc: {
-        nScope: { "[{":"}]" },
-        snippet:"\n[~{TableOfContents }]\n"
+        nScope: { "[{":"}]()" },
+        snippet:"\n[~{TableOfContents }]()\n"
     },
 
     tocParams: {
-        scope:{ '[{TableOfContents':'}]'},
+        scope:{ '[{TableOfContents':'}]()'},
         suggest: "\\s",
         tocParams: [Dialog.Selection, {
             caption: "dialog.toc.options".localize(),
@@ -508,7 +508,7 @@ Wiki.Snips = {
         }]
     },
 
-    plugin: "\n[{{plugin} \n{=body}\n}]\n",
+    plugin: "\n[{{plugin} \n{=body}\n}]()\n",
 
     pluginDlg: {
         //match [{plugin}]  do not match [[{
@@ -562,7 +562,7 @@ Wiki.Snips = {
 
         key: "control+enter",
         snippet: "{format}",
-        nscope: { "[":"]" },
+        nscope: { "[":"]()" },
 
         suggest: function(textarea, caret /*, fromStart*/){
 
@@ -582,35 +582,35 @@ Wiki.Snips = {
 
             if( textarea.isCaretAtStartOfLine() ){
                 Object.append(body, {
-                    "\n{!!!}": "<span title='header'>H<span 
class='sub'>1</span></span>",
-                    "\n{!!}": "<span title='title'>H<span 
class='sub'>2</span></span>",
-                    "\n{!}": "<span title='sub-title'>H<span 
class='sub'>3</span></span>",
+                    "\n{# }": "<span title='header'>H<span 
class='sub'>1</span></span>",
+                    "\n{## }": "<span title='title'>H<span 
class='sub'>2</span></span>",
+                    "\n{### }": "<span title='sub-title'>H<span 
class='sub'>3</span></span>",
                     "\n* {list item}": "<span class='icon-list-ul'/>",
-                    "\n# {list-item}": "<span class='icon-list-ol'/>",
+                    "\n1. {list-item}": "<span class='icon-list-ol'/>",
                     "divider-sol": ""
                 });
             }
 
             Object.append(body, {
-                "__{bold}__": "<span 
style='font-family:serif;'><b>B</b></span>",
-                "''{italic}''": "<span 
style='font-family:serif;'><i>I</i></span>",
-                "{{{monospaced}}} ": "<tt title='inline 
monospaced'>&lt;&gt;</tt>",
-                "{{{{code}}}}": "<span title='code' class='small' 
style='font-family:monospace;'>code</span>",
+                "**{bold}**": "<span 
style='font-family:serif;'><b>B</b></span>",
+                "_{italic}_": "<span 
style='font-family:serif;'><i>I</i></span>",
+                "``{monospaced}`` ": "<tt title='inline 
monospaced'>&lt;&gt;</tt>",
+                "```{code}```": "<span title='code' class='small' 
style='font-family:monospace;'>code</span>",
                 "divider1": "",
-                "[{link}]": "<span class='icon-link' title='Insert a link'/>",
+                "[link]()": "<span class='icon-link' title='Insert a link'/>",
                 //"[description|{link}|options]": "<span class='icon-link'/>",
-                "[{Image src='{image.jpg}'}]": "<span class='icon-picture' 
title='Insert an image'/>",
-                "[{{plugin}}]": "<span class='icon-puzzle-piece' title='Insert 
a Plugin'></span>",
-                "%%style {body} /%":"<span 
style='font-family:monospace;letter-spacing:-.2em;' title='Add a 
Style'>%%</span>",
+                "[{Image src='{image.jpg}'}]()": "<span class='icon-picture' 
title='Insert an image'/>",
+                "[{{plugin}}]()": "<span class='icon-puzzle-piece' 
title='Insert a Plugin'></span>",
+                "<!----> {body} { style='' }":"<span 
style='font-family:monospace;letter-spacing:-.2em;' title='Add a 
Style'>%%</span>",
                 "divider2": "",
-                "%%(font-family:{font};) body /%":"<span title='Change the 
Font'><span style='font-family:serif;'>A</span><span 
style='font-family:sans-serif'>a</span></span>",
+                "<!----> {body} { style='font-family:{font};' }":"<span 
title='Change the Font'><span style='font-family:serif;'>A</span><span 
style='font-family:sans-serif'>a</span></span>",
                 "&{entity};" : "<span style='font-family:cursive;' 
title='Insert a Special Character'>&amp;</span>",
                 //"%%sub {subscript}/% ": "a<span class='sub'>n</span>",
                 //"%%sup {superscript}/% ": "a<span class='sup'>m</span>",
                 //"%%strike {strikethrough}/% ":"<span 
class='strike'>S</span>",
                 //"divider3": "",
-                "[{ALLOW {permission} principal }]":"<span 
class='icon-unlock-alt' title='Add a page ACL'></span>",
-                "\\\\\n":"<b title='Insert a New Line'>&para;</b>"
+                "[{ALLOW {permission} principal }]()":"<span 
class='icon-unlock-alt' title='Add a page ACL'></span>",
+                "&nbsp;&nbsp;\n":"<b title='Insert a New Line'>&para;</b>"
             });
 
             if( textarea.isCaretAtStartOfLine()
@@ -618,9 +618,9 @@ Wiki.Snips = {
             &&  textarea.slice(caret.start,caret.end-1).indexOf("\n") > -1 ){
                 Object.append(body, {
                 "divider-code": "",
-                    "\n{{{\n/* code block */\n{code block}\n}}}\n": "<span 
class='small' style='font-family:monospace;'>&lt;/&gt;</span>",
-                    "\n%%prettify\n{{{\n{pretiffied code block}\n}}}/%\n": 
"<span class='small' 
style='font-family:monospace;color:green;'>&lt;/&gt;</span>",
-                    "\n%%scrollable\n{{{\n{code block}\n}}}/%\n": 
"&darr;&uarr;"
+                    "\n```\n/* code block */\n{code block}\n```\n": "<span 
class='small' style='font-family:monospace;'>&lt;/&gt;</span>",
+                    "\n```\n{pretiffied code block}\n```{.prettify}\n": "<span 
class='small' style='font-family:monospace;color:green;'>&lt;/&gt;</span>",
+                    "\n```\n{scrollable code block}\n```{.scrollable}\n": 
"&darr;&uarr;"
                 });
             }
 
diff --git a/jspwiki-markdown/src/main/javascript/wro.properties 
b/jspwiki-markdown/src/main/javascript/wro.properties
new file mode 100644
index 0000000..0a5b33b
--- /dev/null
+++ b/jspwiki-markdown/src/main/javascript/wro.properties
@@ -0,0 +1,24 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+#minimizeEnabled=false
+debug=true
+
+
+preProcessors=semicolonAppender
+postProcessors=uglifyJs
+
diff --git a/jspwiki-markdown/src/main/javascript/wro.xml 
b/jspwiki-markdown/src/main/javascript/wro.xml
new file mode 100644
index 0000000..02008a3
--- /dev/null
+++ b/jspwiki-markdown/src/main/javascript/wro.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<groups xmlns="http://www.isdc.ro/wro";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://www.isdc.ro/wro wro.xsd">
+
+  <group name="wiki-snips-markdown">
+    <js>/javascript/Wiki.Snips.Markdown.js</js>
+  </group>
+
+</groups>
\ No newline at end of file
diff --git a/jspwiki-war/src/main/config/wro/wro-haddock.xml 
b/jspwiki-war/src/main/config/wro/wro-haddock.xml
index 623a99d..b36f512 100644
--- a/jspwiki-war/src/main/config/wro/wro-haddock.xml
+++ b/jspwiki-war/src/main/config/wro/wro-haddock.xml
@@ -116,9 +116,10 @@
     <js>/scripts/wiki-edit/Snipe.Snips.js</js>
     <js>/scripts/wiki-edit/Snipe.Commands.js</js>
     <js>/scripts/wiki-edit/Snipe.Sections.js</js>
-    <js>/scripts/wiki-edit/Wiki.Snips.js</js>
-    <js>/scripts/wiki-edit/Wiki.Edit.js</js>
+  </group>
 
+  <group name="haddock-wiki-edit">
+    <js>/scripts/wiki-edit/Wiki.Edit.js</js>
   </group>
 
 </groups>
\ No newline at end of file

Reply via email to