Commit bd80b0a094c3b3dc85d10093ca1390ab2ee35085
- Diff rendering mode:
- inline
- side by side
twotwodo.js
(3 / 3)
|   | |||
| 35 | 35 | var i = 0, tmp1, tmp2 = html; | |
| 36 | 36 | do { | |
| 37 | 37 | tmp1 = tmp2; i++; | |
| 38 | tmp2 = tmp1.replace(/(^|[^>]):(todo|started|done)/, | ||
| 38 | tmp2 = tmp1.replace(/(^|[^>]):(todo|started|done|canceled)/, | ||
| 39 | 39 | '$1<span class="state $2" id="'+tid+'-state-'+i+'">:$2</span>'); | |
| 40 | 40 | } while (tmp1 != tmp2); | |
| 41 | 41 | html = tmp2; | |
| … | … | ||
| 46 | 46 | TwoTwoDo.utils.html2txt = function (html) { | |
| 47 | 47 | var txt = html.replace(/<br( \/)?>/g, '\n'); | |
| 48 | 48 | txt = txt.replace(/#<span class="memowiki">([a-zA-Z0-9]*)<\/span>/g, '#$1'); | |
| 49 | txt = txt.replace(/<span class="state (todo|started|done)" id=".*?-state-[0-9]+">: | ||
| 49 | txt = txt.replace(/<span class="state (todo|started|done|canceled)" id=".*?-state-[0-9]+">: | ||
| 50 | 50 | return txt; | |
| 51 | 51 | }; | |
| 52 | 52 | ||
| … | … | ||
| 69 | 69 | }, | |
| 70 | 70 | cur_memo: 'memo', | |
| 71 | 71 | memo: { | |
| 72 | 'memo': 'This is the MemoWiki content for the \'memo\' hashtag :-)<br />Like tasks, memo can contains state markers and hashtag links to other memo.<br /><br />Write #another memo [<span class="state todo" id="iu-1-state-0">:todo</span>]' | ||
| 72 | 'memo': 'This is the MemoWiki content for the \'memo\' hashtag :-)<br />Like tasks, memo can contains state markers and hashtag links to other memo.<br /><br />Write #another memo [<span class="state todo" id="memo-state-0">:todo</span>]' | ||
| 73 | 73 | } | |
| 74 | 74 | }; | |
| 75 | 75 |

