Browse code

handle ducks

devnewton authored on 19/06/2016 22:51:44
Showing 2 changed files
... ...
@@ -11,7 +11,7 @@ function convert() {
11 11
 convertButton.addEventListener('click', convert);
12 12
 
13 13
 function init() {
14
-	inputArea.value = '10:11:03 [:bondour] les <b>moules<</b>';
14
+	inputArea.value = '>o_/ 22:23:56 #5766f86ae4b00e368dfab8a3 [:bondour] 2016/06/19#10:22:01 les <b>moules<</b> \_o<';
15 15
 	convert();
16 16
 }
17 17
 document.readyState === "interactive" || document.readyState === "complete" ? init() : document.addEventListener("DOMContentLoaded", init);
... ...
@@ -4,11 +4,20 @@ post
4 4
  
5 5
 postItem
6 6
  = totoz
7
+ / canard
7 8
  / bigorno
8 9
  / norloge
9 10
  / opentag
10 11
  / closetag
11 12
  / .
13
+ 
14
+canard
15
+= ("\\_" teteCanard "<" / ">" teteCanard "_/")
16
+ {return '<canard/>';}
17
+ 
18
+teteCanard
19
+ = [o0ô°øòó@]
20
+ 
12 21
 
13 22
 opentag
14 23
  = $("<" tag ">")
... ...
@@ -83,7 +92,7 @@ norlogeSeconds
83 92
 norlogeId =
84 93
  "#" chars:[a-zA-Z0-9_]+
85 94
  { var norlogeId = chars.join("");
86
-   return '<norloge-id' + norlogeId + '">#' + norlogeId + '</norloge-id>';
95
+   return '<norloge-id>#' + norlogeId + '</norloge-id>';
87 96
    }
88 97
 
89 98
 bigorno