Lines Matching +full:style +full:. +full:local +full:. +full:ini

4           dom.click();
13 results = results.replace(regex, function(m) {
14 m= m.replace(/\s+/g,"");
18 regex = new RegExp("\\>(.*?)(\\]\\]\\<\\/font\\>)|(\\<\\/font\\>\\]\\])","gm");
19 if(results.match(regex)) return true;
21 regex = new RegExp("(\\{\\{(.*?)\\.\\w{2,4})\\|\\<font");
22 if(results.match(regex)) return true;
24 regex = new RegExp("\\{\\{(.*?)\\.\\w{2,4}\\|[:\\w\\-\\.\\s]+\\<\\/font");
25 if(results.match(regex)) return true;
27 regex = new RegExp('\\>\\{\\{(.*?)\\.\\w+\\<\\/font\\>\\b', 'gm');
28 if(results.match(regex)) return true;
36 function check_rowspans(rows,start_row, ini) {
38 for(var i=start_row; i < rows.length; i++) {
39 for(var col=0; col<rows[i].length; col++) {
40 if(rows[i][col].rowspan > 0) {
41 … var _text = rows[i][col].text;
42 … tmp.push({row:i,column:col, spans: rows[i][col].rowspan,text:_text});
43 if(!ini) break;
52 var prev_colspans = rows[row][col].colspan ? rows[row][col].colspan: 0;
53 rows[row][col].rowspan = 0;
56 …rows[++row].splice(col, 0,{type:'td', rowspan:0,colspan:prev_colspans,prev_colspan:prev_colspans,t…
65 var num_spans = tmp_start.length;
69 var row = tmp_start[0].row;
70 var col = tmp_start[0].column;
71 insert_rowspan(row,col,tmp_start[0].spans,rows);
77 if(tmp.length) {
78 insert_rowspan(tmp[0].row,tmp[0].column,tmp[0].spans,rows);
87 for(var i=0; i<rows.length;i++) {
92 for(var i=0; i < rows.length; i++) {
94 for(var col=0; col<rows[i].length; col++) {
95 var type = rows[i][col].type == 'td'? '|': '^';
97 … var align = rows[i][col].align ? rows[i][col].align : false;
102 results += rows[i][col].text;
107 if(rows[i][col].colspan) {
108 for(var n=0; n < rows[i][col].colspan-1; n++) {
120 window.dwfckTextChanged = false;
192 String.prototype.splice = function( idx, rem, s ) {
193 return (this.slice(0,idx) + s + this.slice(idx + Math.abs(rem)));
195 String.frasl = new RegExp("⁄\|&frasl;\|&#8260;\|&#x2044;",'g');
197 HTMLParser( CKEDITOR.instances.wiki__text.getData(), {
252 var c1_inx = results.lastIndexOf(c1); // start position of chars to delete
253 var c2_inx = results.indexOf(c2,c1_inx); // position of expected next character
255 if(c1.length + c2_inx == c2_inx) {
256 var left_side = results.substring(0,c1_inx); //from 0 up to but not including c1
257 var right_side = results.substring(c2_inx); //from c2 to end of string
264 var iw_type = class_name.match(/iw_(\w+\.?\w{0,12})/);
265 var iw_title = title.split(/\//);
267 var interwiki_label = iw_title[iw_title.length-1];
268 interwiki_label = interwiki_label.replace(String.frasl,"\/");
269 if(!interwiki_label.match(/oIWIKIo.*?cIWIKIc/)) {
272 interwiki_label = interwiki_label.replace(/^.*?oIWIKIo/,'oIWIKIo');
273 interwiki_label = interwiki_label.replace(/cIWIKIc.*/,'cIWIKIc');
274 iw_type[1] = iw_type[1].replace(/_(\w{2})/g, "." +"$1" );
275 … this.attr = iw_type[1] + '>' + decodeURIComponent(interwiki_label);
278 this.interwiki=true;
282 this_debug = this.dbg;
285 if(format_chars[tag] && this.in_link) {
286 this.link_formats.push(tag);
289 if(format_chars[tag] && (this.in_font || this.in_header)) {
300 if(format_chars[tag] && this.in_endnotes) {
304 this.prev_list_level = this.list_level;
305 this.list_level++;
306 if(this.list_level == 1) this.list_started = false;
307 if(this.list_started) this.prev_li.push(markup['li']) ;
312 else if(!this.list_level) {
314 this.prev_li = new Array();
317 this.is_mediafile =false;
323 var style = false;
327 this.is_smiley = false;
328 this.in_link = false;
334 this.xcl_markup = false; // set to false in end() as well, double sure
335 this.in_link = true;
336 this.link_pos = results.length;
337 this.link_formats = new Array();
338 this.footnote = false;
340 this.id = "";
341 this.external_mime = false;
343 this.export_code = false;
344 this.code_snippet = false;
345 this.downloadable_file = "";
347 this.link_only = false;
349 this.interwiki=false;
350 this.bottom_url=false;
351 this.link_title = false;
357 this.in_link = false;
358 if(this.in_table) {
366 this.td_no = 0;
367 this.tr_no = 0;
368 this.in_table = true;
369 this.is_rowspan = false;
370 this.row=-1;
371 this.rows = new Array();
372 CurrentTable = this.rows;
373 this.table_start = results.length;
376 this.tr_no++;
377 this.td_no = 0;
378 this.col=-1;
379 this.row++;
380 this.rows[this.row] = new Array();
381 this.current_row = this.rows[this.row];
384 this.td_no++;
385 this.col++;
386 this.current_row[this.col] = {type:tag, rowspan:0,colspan:0,text:""};
387 this.cell_start = results.length;
388 this.current_cell = this.current_row[this.col];
389 if(this.td_rowspan && this.rowspan_col == this.td_no && this.td_no != this.last_column) {
390 this.is_rowspan = true;
391 this.td_rowspan --;
394 this.is_rowspan = false;
402 this.attr=false;
403 this.format_tag = false;
405 if(format_chars[tag])this.format_tag = true;
408 for ( var i = 0; i < attrs.length; i++ ) {
410 // if(!confirm(tag + ' ' + attrs[i].name + '="' + attrs[i].escaped + '"')) exit;
412 if(attrs[i].name =='colspan') {
413 this.current_row[this.col].colspan = attrs[i].value;
415 if(attrs[i].name =='class') {
416 if((matches=attrs[i].value.match(/(left|center|right)/))) {
417 this.current_row[this.col].align = matches[1];
420 if(attrs[i].name == 'rowspan') {
421 this.current_row[this.col].rowspan= attrs[i].value
424 if(attrs[i].escaped == 'u' && tag == 'em' ) {
426 this.attr='u'
431 if(attrs[i].name == 'class' && attrs[i].value == 'footnotes') {
433 this.in_endnotes = true;
437 … if(tag == 'dl' && attrs[i].name == 'class' && attrs[i].value == 'file') {
438 this.downloadable_code = true;
442 if(tag == 'span' && attrs[i].name == 'class') {
443 if(attrs[i].value == 'np_break') return;
446 if(tag == 'span' && attrs[i].name == 'class') {
447 if(attrs[i].value =='curid') {
448 this.curid = true;
451 if(attrs[i].value == 'multi_p_open') {
452 this.in_multi_plugin = true;
456 if(attrs[i].value == 'multi_p_close') {
457 this.in_multi_plugin = false;
460 if(attrs[i].value.match(geshi_classes)) {
462 this.geshi = true;
469 if(attrs[i].name == 'style') {
470 if(!this.in_font) results += "__STYLE__";
471 this.in_font=true;
472 this.using_fonts = true;
473 matches = attrs[i].value.match(/font-family:\s*([\w\-\s,]+);?/);
475 this.font_family = matches[1];
478 //matches = attrs[i].value.match(/font-size:\s*(\d+(\w+|%));?/);
479 matches = attrs[i].value.match(/font-size:\s*(.*)/);
481 matches[1]=matches[1].replace(/;/,"");
482 this.font_size = matches[1];
484 matches = attrs[i].value.match(/font-weight:\s*(\w+);?/);
486 this.font_weight = matches[1];
488 matches = attrs[i].value.match(/.*?color:\s*(.*)/);
491 matches[1]=matches[1].replace(/;/,"");
492 if(matches[0].match(/background/)) {
493 this.font_bgcolor = matches[1];
496 this.font_color = matches[1];
500 matches = attrs[i].value.match(/background:\s*(\w+)/);
501 if(matches && matches[0].match(/background/)) {
502 this.font_bgcolor = matches[1];
511 results = results.replace(/\^$/,'|');
513 this.in_td = true;
514 if(attrs[i].name == 'align') {
515 this.td_align =attrs[i].escaped;
518 else if(attrs[i].name == 'class') {
519 matches = attrs[i].value.match(/\s*(\w+)align/);
521 this.td_align = matches[1];
524 else if(attrs[i].name == 'colspan') {
526 this.td_colspan =attrs[i].escaped;
528 else if(attrs[i].name == 'rowspan') {
529 this.td_rowspan =attrs[i].escaped-1;
530 this.rowspan_col = this.td_no;
538 // if(!confirm(attrs[i].name + '="' + attrs[i].escaped + '"')) exit;
539 if(attrs[i].name == 'title') {
540 this.link_title = attrs[i].escaped;
542 interwiki_title = attrs[i].escaped;
544 … else this.link_title = this.link_title.replace(/\s+.*$/,"") ;
546 else if(attrs[i].name == 'class') {
547 if(attrs[i].value.match(/fn_top/)) {
548 this.footnote = true;
550 else if(attrs[i].value.match(/fn_bot/)) {
553 else if(attrs[i].value.match(/mf_(png|gif|jpg|jpeg)/i)) {
554 this.link_only=true;
556 else if(attrs[i].value.match(/interwiki/)) {
557 attrs[i].value = attrs[i].value.replace(/\./g,'_');
558 this.link_class = attrs[i].value;
562 this.link_class= attrs[i].escaped;
564 media_class = this.link_class.match(/mediafile/);
566 else if(attrs[i].name == 'id') {
567 this.id = attrs[i].value;
569 else if(attrs[i].name == 'type') {
570 type = attrs[i].value;
573 else if(attrs[i].name == 'href' && !this.code_type) {
574 var http = attrs[i].escaped.match(/https*:\/\//) ? true : false;
575 if(http) save_url = attrs[i].escaped;
576 if(attrs[i].escaped.match(/\/lib\/exe\/detail.php/)) {
577 this.image_link_type = 'detail';
579 else if(attrs[i].escaped.match(/exe\/fetch.php/)) {
580 this.image_link_type = 'direct';
583 if(this.link_class && this.link_class.match(/media/) && !this.link_title) {
584 var link_find = attrs[i].escaped.match(/media=(.*)/);
585 if(link_find) this.link_title = link_find[1];
589 … var media_type = attrs[i].escaped.match(/fetch\.php.*?media=.*?\.(png|gif|jpg|jpeg)$/i);
592 if(attrs[i].escaped.match(/^https*:/)) {
593 this.attr = attrs[i].escaped;
596 if(attrs[i].escaped.match(/^ftp:/)) {
597 this.attr = attrs[i].escaped;
600 else if(attrs[i].escaped.match(/do=export_code/)) {
601 this.export_code = true;
603 else if(attrs[i].escaped.match(/^nntp:/)) {
604 this.attr = attrs[i].escaped;
607 else if(attrs[i].escaped.match(/^mailto:/)) {
608 this.attr = attrs[i].escaped.replace(/mailto:/,"");
611 else if(attrs[i].escaped.match(/m-files/)) {
612 this.attr = attrs[i].escaped;
613 this.mfile = attrs[i].escaped;
616 else if(attrs[i].escaped.match(/^file:/)) { //samba share
617 var url= attrs[i].value.replace(/file:[\/]+/,"");
618 url = url.replace(/[\/]/g,'\\');
620 this.attr = url;
624 … else if(http && !media_type && (matches = attrs[i].escaped.match(/fetch\.php(.*)/)) ) {
625 if(matches[1].match(/media=/)) {
626 elems = matches[1].split(/=/);
627 this.attr = elems[1];
630 matches[1] = matches[1].replace(/^\//,"");
631 this.attr = matches[1];
635 var regex = new RegExp(config_animal + '\/file\/(.*)');
636 matches = attrs[i].escaped.match(regex);
637 if(matches && matches[1]) this.attr = matches[1];
638 … if(this.attr) this.attr = this.attr.replace(/\//g,':');
642 …this.attr = decodeURIComponent ? decodeURIComponent(this.attr) : unescape(this.attr); …
643 if(!this.attr.match(/^:/)) {
644 this.attr = ':' +this.attr;
646 this.external_mime = true;
652 matches = attrs[i].escaped.match(/doku.php\?id=(.*)/);
654 var rx = DOKU_BASE + 'doku.php';
655 if(!attrs[i].escaped.match(rx)) {
656 this.link_class == 'urlextern';
657 this.attr = save_url;
662 matches = attrs[i].escaped.match(/doku.php\/(.*)/);
665 requires initial ? to be recognized by DW. In Anteater and later */
667 if(!matches[1].match(/\?/) && matches[1].match(/&amp;/)) {
669 matches[1] = matches[1].replace(/&amp;/,'?')
673 if(!matches[1].match(/^:/)) {
674 this.attr = ':' + matches[1];
677 this.attr = matches[1];
680 if(this.attr.match(/\.\w+$/)) { // external mime's first access
682 this.external_mime = true;
685 for(var n = i+1; n < attrs.length; n++) {
686 if(attrs[n].value.match(/other_mime/))
687 this.external_mime = true;
696 matches = attrs[i].value.match(/\\\\/); // Windows share
698 this.attr = attrs[i].escaped;
704 if(this.link_class == 'media') {
705 if(attrs[i].value.match(/http:/)) {
710 if(!this.attr && this.link_title) {
712 if(matches = this.link_class.match(/media(.*)/)) {
713 … this.link_title=decodeURIComponent(safe_convert(this.link_title));
714 this.attr=this.link_title;
715 var m = matches[1].split(/_/);
723 if(!this.attr.match(/^:/) && !this.attr.match(/^https?\:/)) {
724 this.attr = ':' + this.attr.replace(/^\s+/,"");
726 this.external_mime = true;
731 …if(this.attr.match && this.attr.match(/%[a-fA-F0-9]{2}/) && (matches = this.attr.match(/userfiles…
732 matches[1] = matches[1].replace(/\//g,':');
733 if(!matches[1].match(/^:/)) {
736 …this.attr = decodeURIComponent ? decodeURIComponent(matches[1]) : unescape(matches[1]); …
737 … this.attr = decodeURIComponent ? decodeURIComponent(this.attr) : unescape(this.attr);
738 this.external_mime = true;
741 else if(this.attr && this.attr.match(/%[a-fA-F0-9]{2}/)) {
742 this.attr = decodeURIComponent(this.attr);
743 this.attr = decodeURIComponent(this.attr);
746 …// alert('title: ' + this.link_title + ' class: ' + this.link_class + ' export: ' +this.export_co…
747 … if(this.link_title && this.link_title.match(/Snippet/)) this.code_snippet = true;
750 if(attrs[i].value.match(/^#/) && this.link_class.match(/wikilink/)) {
751 this.attr = attrs[i].value;
752 this.link_title = false;
756 if(this.link_class.match(/wikilink/) && this.link_title) {
757 this.external_mime = false;
758 if(!this.attr){
759 this.attr = this.link_title;
761 if(!this.attr.match(/^:/)) {
762 this.attr = ':' + this.attr;
764 if(this.attr.match(/\?.*?=/)){
765 var elems = this.attr.split(/\?/);
766 elems[0] = elems[0].replace(/\//g,':');
767 this.attr = elems[0] + '?' + elems[1];
770 this.attr = this.attr.replace(/\//g,':');
773 /* catch query strings attached to internal links for .htacess nice urls */
774 if(!qs_set && attrs[i].name == 'href') {
775 if(!this.attr.match(/\?.*?=/) && !attrs[i].value.match(/doku.php/)) {
776 var qs = attrs[i].value.match(/(\?.*)$/);
777 if(qs && qs[1]) this.attr += qs[1];
782 else if(this.link_class.match(/mediafile/) && this.link_title && !this.attr) {
783 this.attr = this.link_title;
784 this.external_mime = true;
786 if(!this.attr.match(/^:/)) {
787 this.attr = ':' + this.attr;
790 else if(this.link_class.match(/interwiki/)) {
791 interwiki_class=this.link_class;
794 if(this.link_class == 'urlextern' && !this.mfile && save_url) {
795 this.attr = save_url;
796 …this.external_mime=false; // prevents external links to images from being converted to image links
798 if(this.in_endnotes) {
799 if(this.link_title) {
800 this.bottom_url= this.link_title; //save for bottom urls
802 else if(this.attr) {
803 this.bottom_url= this.attr;
806 this.link_title = "";
807 this.link_class= "";
813 this.is_iwiki(interwiki_class, interwiki_title);
819 if(attrs[i].name == 'class') {
820 matches = attrs[i].value.split(/\s+/);
822 this.attr = matches[0];
824 if(oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[matches[1]]) {
825 … dwfck_note = '(('+ oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[matches[1]] + '))';
833 if(attrs[i].name == 'class') {
835 var elems = attrs[i].escaped.split(/\s+/);
836 if(elems.length > 1) {
837 this.attr = attrs[i].value;
838 this.code_type = elems[0];
841 this.attr = attrs[i].escaped;
842 this.code_type = this.attr;
844 if(this.downloadable_code) {
845 this.attr = this.attr.replace(/\s*code\s*/,"");
846 this.code_type='file';
849 if(this.in_table) tag = 'pre_td';
856 if(attrs[i].name == 'alt') {
857 alt=attrs[i].value;
859 if(attrs[i].name == 'type') {
860 this.image_link_type = attrs[i].value;
863 if(attrs[i].name == 'src') {
864 …// alert(attrs[i].name + ' = ' + attrs[i].value + ', fnencode=' + oDokuWiki_FCKEditorInstance.dw…
867 // fetched by fetch.php
868 if(matches = attrs[i].escaped.match(/fetch\.php.*?(media=.*)/)) {
869 var elems = matches[1].split('=');
871 if(matches = attrs[i].escaped.match(/(media.*)/)) {
872 var elems = matches[1].split('=');
876 if(!src.match(/https?:/) && !src.match(/^:/)) src = ':' + src;
878 else if(attrs[i].escaped.match(/https?:\/\//)){
879 src = attrs[i].escaped;
880 src = src.replace(/\?.*?$/,"");
883 … else if(matches = attrs[i].escaped.match(/\/_media\/(.*)/)) {
884 var elems = matches[1].split(/\?/);
886 src = src.replace(/\//g,':');
887 if(!src.match(/^:/)) src = ':' + src;
890 else if(matches = attrs[i].escaped.match(/\/lib\/exe\/fetch.php\/(.*)/)) {
891 var elems = matches[1].split(/\?/);
893 if(!src.match(/^:/)) src = ':' + src;
898 matches = attrs[i].escaped.match(/^.*?\/userfiles\/image\/(.*)/);
900 var regex = new RegExp(config_animal + '\/image\/(.*)$');
901 … matches = attrs[i].escaped.match(regex);
903 if(!matches) { // windows style
905 regex = regex.replace(/([\/\\])/g, "\\$1");
906 regex = '^.*?' + regex + '(.*)';
908 matches = attrs[i].escaped.match(regex);
911 src = matches[1].replace(/\//g, ':');
915 …src = decodeURIComponent ? decodeURIComponent(attrs[i].escaped) : unescape(attrs[i].escaped); …
916 if(src.search(/data:image.*?;base64/) > -1) {
922 if(src && src.match(/lib\/images\/smileys/)) {
923 // src = 'http://' + window.location.host + src;
924 this.is_smiley = true;
926 this.attr = src;
927 …if(this.attr && this.attr.match && this.attr.match(/%[a-fA-F0-9]{2}/)) { …
928 this.attr = decodeURIComponent(safe_convert(this.attr));
929 … this.attr = decodeURIComponent(safe_convert(this.attr));
936 else if (attrs[i].name == 'width' && !style) {
937 width=attrs[i].value;
940 else if (attrs[i].name == 'height' && !style) {
941 height=attrs[i].value;
943 else if(attrs[i].name == 'style') {
944 var match = attrs[i].escaped.match(/width:\s*(\d+)/);
947 var match = attrs[i].escaped.match(/height:\s*(\d+)/);
951 else if(attrs[i].name == 'align' || attrs[i].name == 'class') {
952 if(attrs[i].escaped.match(/(center|middle)/)) {
955 else if(attrs[i].escaped.match(/right/)) {
958 else if(attrs[i].escaped.match(/left/)) {
968 if(this.is_smiley) {
973 this.is_smiley = false;
976 if(this.link_only) tag = 'img';
978 if(this.in_multi_plugin) {
983 if(!this.code_type) {
986 else if(this.code_type) {
991 if(this.in_table) {
995 if(this.list_started) {
1003 else if(tag.match(/^h(\d+|r)/)) {
1004 var str_len = results.length;
1005 if(tag.match(/h(\d+)/)) {
1006 this.in_header = true;
1009 if(results.charCodeAt(str_len -1) == 32) {
1010 results = results.replace(/\x20+$/,"");
1014 else if(this.last_col_pipes) {
1023 if(tag == 'b' || tag == 'i' && this.list_level) {
1024 if(results.match(/(\/\/|\*)(\x20)+/)) {
1025 results = results.replace(/(\/\/|\*)(\x20+)\-/,"$1\n"+"$2-");
1029 if(tag == 'li' && this.list_level) {
1030 if(this.list_level == 1 & !this.list_started) {
1032 this.list_started = true;
1034 results = results.replace(/[\x20]+$/,"");
1036 for(var s=0; s < this.list_level; s++) {
1038 if(results.match(/_FORMAT_SPACE_\s*$/)) {
1039 results = results.replace(/_FORMAT_SPACE_\s*$/,"\n");
1041 if(this.list_level > 1) {
1046 if(this.prev_list_level > 0 && markup['li'] == markup['ol']) {
1047 this.prev_list_level = -1;
1050 if(tag == 'a' && this.list_level) {
1054 this.xcl_markup = true;
1057 else if(tag == 'a' && (this.export_code || this.code_snippet)) {
1060 else if (tag == 'a' && this.footnote) {
1064 HTMLParserTopNotes.push(this.id);
1066 else if(tag == 'a' && this.external_mime) {
1067 if(this.in_endnotes) {
1068 this.link_class = 'media';
1074 results += this.attr + '|';
1075 this.is_mediafile = true;
1080 else if(this.in_font) {
1082 results = results.replace(/__STYLE__/,'[[' + this.attr + '|');
1083 this.in_font = false;
1089 if(this.in_endnotes && tag == 'a') return;
1090 if(this.code_type && tag == 'span') tag = 'blank';
1091 if(this.mfile && !this.attr) {
1092 this.attr = this.mfile;
1096 if(tag == 'td' || tag == 'th' || (this.last_col_pipes && this.td_align == 'center')) {
1097 if(this.is_rowspan) {
1099 this.is_rowspan = false;
1101 if(this.td_align == 'center' || this.td_align == 'right') {
1106 else if(tag == 'a' && this.attr) {
1107 this.attr = this.attr.replace(/%7c/,'%257c');
1108 results += this.attr + '|';
1111 var link_type = this.image_link_type;
1112 this.image_link_type="";
1113 if(this.link_only) link_type = 'link_only';
1139 this.attr += img_size;
1141 this.attr += ' ';
1144 results += this.attr + '|' + alt +'}}';
1146 else results += this.attr + '}}';
1147 this.attr = 'src';
1150 if(this.downloadable_file) this.attr += ' ' + this.downloadable_file;
1151 if(!this.attr) this.attr = 'code';
1152 results += this.attr + '>';
1153 this.downloadable_file = "";
1154 this.downloadable_code = false;
1162 if(format_chars[tag] && (this.in_font || this.in_header)){
1172 if(this.in_endnotes && tag == 'a') return;
1173 if(this.in_link && format_chars[current_tag] && this.link_formats.length) {
1176 else if(tag == 'a' && ! this.link_formats.length) this.in_link = false;
1178 if(this.link_only){
1179 this.link_only=false;
1185 if(tag == 'sup' && this.attr == 'dwfcknote') {
1188 if(this.is_smiley) {
1189 this.is_smiley = false;
1192 if(tag == 'span' && this.in_font && !ckgdoku_xcl_styles) {
1195 …var font_str = '<font ' + this.font_size + '/' + this.font_family + ';;' + this.font_color + ';;' …
1196 var inherits = font_str.match(/(inherit)/g);
1197 if(inherits && inherits.length < 3) HTMLParserFontInfix = true;
1198 var font_start = results.lastIndexOf('__STYLE__');
1199 results = results.splice(font_start,9,font_str);
1200 results = results.replace(/_FORMAT_SPACE_<font/m, "<font");
1201 this.font_size = 'inherit';
1202 this.font_family = 'inherit';
1203 this.font_color = 'inherit';
1204 this.font_bgcolor = 'inherit';
1205 this.in_font=false;
1207 results = results.replace(/__STYLE__/g,"");
1209 if(tag == 'span' && this.curid) {
1210 this.curid = false;
1213 if(tag == 'dl' && this.downloadable_code) {
1214 this.downloadable_code = false;
1218 this.current_cell.text = results.substring(this.cell_start);
1219 this.current_cell.text = this.current_cell.text.replace(/:::/gm,"");
1220 this.current_cell.text = this.current_cell.text.replace(/^[\s\|\^]+/,"");
1222 if(tag == 'a' && (this.export_code || this.code_snippet)) {
1223 this.export_code = false;
1224 this.code_snippet = false;
1228 if(this.code_type && tag == 'span') tag = 'blank';
1230 if(this.footnote) {
1232 this.footnote = false;
1234 else if(tag == 'a' && this.xcl_markup) {
1235 this.xcl_markup = false;
1239 this.in_table = false;
1241 results = results.substring(0, this.table_start);
1242 insert_table(this.rows);
1246 if(tag == 'p' && this.in_table) {
1250 if(this.geshi) {
1251 this.geshi = false;
1255 if(tag == 'code' && ! this.list_started) { // empty code markup corrupts results
1256 if(results.match(/''\s*$/m)) {
1257 results = results.replace(/''\s*$/, "\n");
1263 else if(tag == 'a' && this.attr == 'src') {
1264 // if local image without link content, as in <a . . .></a>, delete link markup
1265 if(this.backup('\[\[', '\{')) return;
1268 if( this.end_nested) {
1269 this.end_nested = false;
1274 this.list_level--;
1275 if(!this.list_level) this.format_in_list = false;
1276 if(this.prev_li.length) {
1277 markup['li']= this.prev_li.pop();
1278 this.end_nested = true;
1283 else if(tag == 'a' && this.external_mime) {
1284 this.external_mime = false;
1285 if(this.is_mediafile) {
1293 if(this.code_type) {
1294 tag += this.code_type + ">";
1297 var codeinx = results.lastIndexOf('code');
1298 var fileinx = results.lastIndexOf('file');
1300 this.code_type = 'file';
1302 else this.code_type = 'code';
1303 tag += this.code_type + ">";
1305 this.code_type = false;
1311 else if(this.attr == 'u' && tag == 'em' ) {
1321 if(this.last_col_pipes) {
1323 this.last_col_pipes = "";
1326 if(this.td_rowspan && this.rowspan_col == this.td_no+1) {
1327 this.is_rowspan = false;
1328 this.last_column = this.td_no;
1329 this.td_rowspan --;
1334 this.last_col_pipes = "";
1335 this.in_td = false;
1338 else if (current_tag.match(/h\d+/)) {
1339 this.in_header = false;
1344 if(results.match(/\n$/) && !this.list_level) {
1351 if(this.in_endnotes && current_tag == 'sup') {return}
1355 if(this.list_level) {
1356 this.format_in_list = true;
1362 this.last_tag = current_tag;
1364 if(this.td_colspan && !useComplexTables) {
1365 if(this.td_align == 'center') results += ' ';
1370 for(var i=1; i < this.td_colspan; i++) {
1373 this.last_col_pipes = colspan;
1375 this.td_colspan = false;
1377 else if(this.td_align == 'center') {
1379 this.td_align = '';
1382 if(current_tag == 'a' && this.link_formats.length) {
1383 var end_str = results.substring(this.link_pos);
1384 var start_str = results.substring(0,this.link_pos);
1387 for(var i=0; i < this.link_formats.length; i++) {
1388 var fmt = markup[this.link_formats[i]];
1389 … var endfmt = markup_end[this.link_formats[i]] ? markup_end[this.link_formats[i]]: fmt;
1390 start_format += markup[this.link_formats[i]];
1397 this.link_formats = new Array();
1398 this.in_link = false;
1401 this.link_formats = new Array();
1402 this.in_link = false;
1408 text = text.replace(/\t/g," ");
1410 if(text.match(/~~START_HTML_BLOCK~~/)) {
1411 text = text.replace(/~~START_HTML_BLOCK~~\n*/, "~~START_HTML_BLOCK~~\n<code>\n");
1413 if(text.match(/~~CLOSE_HTML_BLOCK~~/)) {
1414 text = text.replace(/~~CLOSE_HTML_BLOCK~~\n*/gm, "\n</code>\n\n~~CLOSE_HTML_BLOCK~~\n\n");
1417 if(this.interwiki) {
1418 text = text.replace(String.frasl,"\/");
1420 if(this.interwiki && results.match(/>\w+\s*\|$/)) {
1421 this.interwiki=false;
1422 if(this.attr) {
1426 results=results.replace(/>\w+\s*\|$/,'>'+text);
1430 if(this.in_multi_plugin) {
1431 text=text.replace('&lt; ','&lt;');
1433 text = text.replace(/&#39;/g,"'"); //replace single quote entities with single quotes
1434 text = text.replace(/^(&gt;)+/,function(match,quotes) {
1435 return(match.replace(/(&gt;)/g, "\__QUOTE__")) ;
1439 results=results.replace(/([\/\*_])_FORMAT_SPACE_([\/\*_]{2})_FORMAT_SPACE_$/,"$1$2@@_SP_@@");
1440 if(text.match(/^&\w+;/)) {
1441 …results=results.replace(/_FORMAT_SPACE_\s*$/,""); // remove unwanted space after character entity
1444 if(this.link_only) {
1447 results = results.replace(/\}\}\s*$/,replacement);
1451 if(!this.code_type) {
1452 if(! this.last_col_pipes) {
1453 text = text.replace(/\x20{6,}/, " ");
1454 text = text.replace(/^(&nbsp;)+\s*$/, '_FCKG_BLANK_TD_');
1455 text = text.replace(/(&nbsp;)+/, ' ');
1458 if(this.format_tag) {
1459 if(!this.list_started || this.in_table) text = text.replace(/^\s+/, '@@_SP_@@');
1461 else if(this.last_tag=='a') {
1462 text=text.replace(/^\s{2,}/," ");
1464 else if(!this.using_fonts) text = text.replace(/^\s+/, '');
1466 if(text.match(/nowiki&gt;/)) {
1470 if(this.format_in_list || (HTMLParserFont && this.list_started ) ) {
1471 text = text.replace(/^[\n\s]+$/g, '');
1472 if(text.match(/\n{2,}\s{1,}/)) {
1473 text = text.replace(/\n{2,}/, "\n");
1477 if(this.in_td && !text) {
1479 this.in_td = false;
1483 text = text.replace(/&lt;\s/g, '<');
1484 text = text.replace(/\s&gt;/g, '>');
1485 var geshi =text.match(/^\s*geshi:\s+(.*)$/m);
1487 … results= results.replace(/<(code|file)>\s*$/, '<' + "$1" + ' ' + geshi[1] + '>');
1488 text = text.replace( geshi[0], "");
1494 if(this.attr && this.attr == 'dwfcknote') {
1495 if(text.match(/fckgL\d+/)) {
1498 if(text.match(/^[\-,:;!_]/)) {
1509 if(this.downloadable_code && (this.export_code || this.code_snippet)) {
1510 this.downloadable_file = text;
1515 if(this.last_tag == 'a' && text.match(/^[\.,;\:\!]/)) {
1516 results=results.replace(/\s$/,"");
1519 if(this.in_header) {
1520 text = text.replace(/---/g,'&mdash;');
1521 text = text.replace(/--/g,'&ndash;');
1523 if(this.list_started) {
1524 results=results.replace(/_LIST_EOFL_\s*L_BR_K\s*$/, '_LIST_EOFL_');
1526 if(!this.code_type) { // keep special character literals outside of code block
1528 if(!results.match(/\[\[\\\\.*?\|$/) && !text.match(/\w:(\\(\w?))+/ ))
1530 if(!text.match(/\\\\[\w\.\-\_]+\\[\w\.\-\_]+/)) {
1531 text = text.replace(/([\\])/g, '%%$1%%');
1533 text = text.replace(/([\*])/g, '_CKG_ASTERISK_');
1537 if(this.in_endnotes && HTMLParserTopNotes.length) {
1539 if(text.match(/\w/) && ! text.match(/^\s*\d\)\s*$/)) {
1540 text= text.replace(/\)\s*$/, "_FN_PAREN_C_");
1541 var index = HTMLParserTopNotes.length-1;
1542 if(this.bottom_url) {
1543 if(this.link_class && this.link_class == 'media') {
1544 text = '{{' + this.bottom_url + '|' +text +'}}';
1546 else text = '[[' + this.bottom_url + '|' +text +']]';
1549 text = text.replace('(','L_PARgr');
1550 text = text.replace(')','R_PARgr');
1554 text = text.replace('(','L_PARgr');
1555 text = text.replace(')','R_PARgr');
1559 this.bottom_url = false;
1564 if(text && text.length) {
1568 results=results.replace(/(&\w+;)\s*([\*\/_]{2})_FORMAT_SPACE_(\w+)/,"$1$2$3");
1570 if(this.list_level && this.list_level > 1) {
1571 results = results.replace(/(\[\[.*?\]\])([ ]+[\*\-].*)$/," $1\n$2");
1575 …var regex = new RegExp('([\*\/\_]{2,})_FORMAT_SPACE_([\*\/\_]{2,})(' + RegExp.escape(text) + ')$')…
1576 if(results.match(regex)) {
1578 results = results.replace(regex,"$1$2$3");
1583 if(text.match(/&lt;/)) {
1594 if(text.replace) {
1595 text = text.replace(/^\s+/g,"");
1596 text = text.replace(/^\n$/g,"");
1597 text = text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
1615 results = results.replace(/(\[\[\\\\)(.*?)\]\]/gm, function(match,brackets,block) {
1616 block=block.replace(/\\/g,"_SMB_");
1620 results = results.replace(/%%\\%%/g,'_ESC_BKSLASH_');
1621 results = results.replace(/%*\\%*([^\w]{1})%*\\%*/g, "$1");
1623 results=results.replace(/_SMB_/g, "\\");
1625 …results = results.replace(/(\s*={2,}).*?CKGE_TMP_(\w+)(.*?).*?CKGE_TMP_c?\2.*?\1/gm, function(m,ta…
1626 m=m.replace(/CKGE_TMP_\w+/gm,"");
1627 var v = jQuery("#formatdel").val();
1629 …jQuery('#dw__editform').append('<input type="hidden" id="formatdel" name="formatdel" value="del" /…
1633 results = results.replace(/\s?(CKGE_TMP_\w+)\s?/gm, function(m,tag) {
1638 results = results.replace(/(\s*={2,})(.*?)(\[\[|\{\{)(.*?)(\]\]|\}\})(.*?)\1/gm, function(m,h_marku…
1639 end_str = end_str.replace(/\[\[(.*?)\|(.*?)\]\]/g,"$2");
1640 end_str = end_str.replace(/\{\{(.*?)\|(.*?)\}\}/g,"$2");
1641 …m= h_markup + " " + whatever + " " + inner.replace(/.*?\|(.*?)/ ,"$1") + " " + end_str + " " + h_…
1642 var v = jQuery("#formatdel").val();
1644 …jQuery('#dw__editform').append('<input type="hidden" id="formatdel" name="formatdel" value="del" /…
1653 results = results.replace(/\{ \{ rss&gt;Feed:/mg,'{{rss&gt;http://');
1654 results = results.replace(/~ ~ (NOCACHE|NOTOC)~ ~/mg,'~~'+"$1"+'~~');
1657 tag_1 = tag.replace(/oIWIKIo(.*)cIWIKIc/,"$1");
1659 link = link.replace(/\s/,'%20');
1662 …results =results.replace(/\[\[(\w+\.?\w{0,12})>(.*?)\|(.*?)\]\]/gm,function(match,id,iw_replace,li…
1665 …if((iw_replace == 'oIWIKIo'+link_text.replace(/\s/,'%20')+'cIWIKIc') || (iw_replace == link_text)…
1676 results = results.replace(/>.*?oIWIKIo(.*?)cIWIKIc/mg,'>'+"$1");
1680 … results =results.replace(/\s*([\|\^]+)((\W\W_FORMAT_SPACE_)+)/gm,function(match,pipes,format) {
1681 format = format.replace(/_FORMAT_SPACE_/g,"");
1685 results = results.replace(/&quot;/g,'"');
1687 results = results.replace(regex," $1");
1689 results = results.replace(/\]\](\*\*|\/\/|\'\'|__|<\/del>)_FORMAT_SPACE_/,"]]$1@@_SP_@@");
1692 results = results.replace(regex,"$1$2$3");
1695 results = results.replace(regex,' ');
1698 results=results.replace(/([\*\/_]{2})@@_SP_@@(&\w+;)/g,"$1 $2");
1700 results = results.replace(/\n@@_SP_@@\n/g,'');
1701 results = results.replace(/@@_SP_@@\n/g,'');
1702 results = results.replace(/@@_SP_@@/g,' ');
1703 …var regex = new RegExp(HTMLParser_FORMAT_SPACE + '([^\\)\\]\\}\\{\\-\\.,;:\\!\?"\x94\x92\u201D\u20…
1704 results = results.replace(regex," $1");
1706 results = results.replace(regex,'');
1710 results = results.replace(/(\s+[\-\*_]\s*)([\*\/_\']{2})(.*?)(\2)([^\n]*)\n+/gm,
1719 results = results.replace(/(\]\]|\}\})(\s+)(\*|-)/mg,
1721 spaces = spaces.replace(/\n/,"");
1728 results = results.replace(/(L_BR_K)+/g,line_break_final);
1729 results = results.replace(/L_BR_K/gm, line_break_final) ;
1730 results = results.replace(/(\\\\)\s+/gm, "$1 \n");
1734 results = results.replace(/\s+<\/(code|file)>/g, "\n</" + "$1" + ">");
1736 results = results.replace(/\s+;/mg, ";");
1737 results = results.replace(/&lt;\s+/mg, "<");
1738 results = results.replace(/\s+&gt;/mg, ">");
1746 results = results.replace(regex, ' ' +line_break_final + ' ');
1749 results = results.replace(/(\||\^)[ ]+(\||\^)\s$/g, "$1\n");
1750 results = results.replace(/(\||\^)[ ]+(\||\^)/g, "$1");
1753 results = results.replace(/_FCKG_BLANK_TD_/g, " ");
1756 results = results.replace(/\/\/&lt;\/\/\s*/g,'&lt;');
1762 String.prototype.font_link_reconcile = function(v){
1765 regex = /\[\[(.*?)(<font[^\>]+>)([^<]+(\]\])?)[^\>]+\/font>\s*(\]\])/gm;
1767 else regex = /(<font[^\>\{]+>)\{\{(:?.*?)\|(:?.*?)<\/font>/gm;
1771 this.replace(
1774 a=a.replace(/\n/gm,"");
1775 a=a.replace(/\s/gm,"");
1776 a=a.replace(/[\[\]\{\}]/g,"");
1777 a=a.replace(/\|/g,"");
1778 c=c.replace(/\n/gm,"");
1779 c=c.replace(/\s/gm,"");
1780 c=c.replace(/[\[\]\}\{]/g,"");
1785 …var val = prompt(LANG.plugins.ckgdoku.font_err_1 + "\n" + c + "\n" + LANG.plugins.ckgdoku.font_er…
1791 else throw new Error(LANG.plugins.ckgdoku.font_err_throw);
1800 results = results.replace(/<\/font>\s{1}/gm,"</font>");
1804 if(confirm(LANG.plugins.ckgdoku.font_conflict)) return;
1805 var v = jQuery("#fontdel").val();
1807 … jQuery('#dw__editform').append('<input type="hidden" id="fontdel" name="fontdel" value="del" />');
1810 results = results.font_link_reconcile(1);
1811 results = results.font_link_reconcile(2);
1814 results = results.replace(regex, function(m) {
1815 m= m.replace(/\s+/g,"");
1819 …results = results.replace(/\[\[(.*?)\|(<font[^\>]+>)(.*?)(<\/font>)\s*(\]\])\s*/gm,function(match,…
1821 var v = jQuery("#fontdel").val();
1823 … jQuery('#dw__editform').append('<input type="hidden" id="fontdel" name="fontdel" value="del" />');
1828 …results = results.replace(/(\s*={2,})\s*(.*?)(<font[^\>]+>)(.*?)(<\/font>)(.*?)\s*\1/gm,function(m…
1829 match = match.replace(/<\/font>/g," ");
1830 match = match.replace(/<font.*?>/g," ");
1831 var v = jQuery("#formatdel").val();
1833 …jQuery('#dw__editform').append('<input type="hidden" id="formatdel" name="formatdel" value="del" /…
1840 if(HTMLParserTopNotes.length) {
1841 results = results.replace(/<sup>\(\(\){2,}\s*<\/sup>/g,"");
1842 results = results.replace(/\(\(+(\d+)\)\)+/,"(($1))");
1844 var matches = i.match(/_(\d+)/);
1846 HTMLParserBottomNotes[i] = HTMLParserBottomNotes[i].replace(/(\d+)_FN_PAREN_C_/,"");
1847 …results = results.replace(pattern,'((' + HTMLParserBottomNotes[i].replace(/_FN_PAREN_C_/g, ") ") +…
1849 results = results.replace(/<sup><\/sup>/g, "");
1850 results = results.replace(/((<sup>\(\(\d+\)\)\)?<\/sup>))/mg, function(fn) {
1851 if(!fn.match(/p>\(\(\d+/)) {
1860 results = results.replace(/(={3,}.*?)(\{\{.*?\}\})(.*?={3,})/g,"$1$3\n\n$2");
1862 results = results.replace(/(<sup>)*\s*\[\[\s*\]\]\s*(<\/sup>)*\n*/g,"");
1865 results = results.replace(/<sup>\s*\(\(\d+\)\)\s*<\/sup>/mg,"");
1868 results = results.replace(/<\s+/g, '<');
1869 results = results.replace(/&lt;\s+/g, '<');
1874 <char> is restored in save.php
1879 results=results.replace(/(&lt;nowiki&gt;)(.*?)(&lt;\/nowiki&gt;)/mg,
1881 mid = mid.replace(/%%(.)%%/mg,"NOWIKI_$1_");
1882 return start + mid.replace(regex,"NOWIKI_$1_") + close;
1886 results = results.replace(/__SWF__(\s*)\[*/g,"{{$1");
1887 results = results.replace(/\|.*?\]*(\s*)__FWS__/g,"$1}}");
1888 results = results.replace(/(\s*)__FWS__/g,"$1}}");
1889 results = results.replace(/\n{3,}/g,'\n\n');
1890 results = results.replace(/_LIST_EOFL_/gm, " " + line_break_final + " ");
1893 if(results.indexOf('~~COMPLEX_TABLES~~') == -1) {
1897 if(!useComplexTables) { results = results.replace(/~~COMPLEX_TABLES~~/gm,""); }
1898 results=results.replace(/_CKG_ASTERISK_/gm,'*');
1899 results = results.replace(/_ESC_BKSLASH_/g,'\\');
1906 results=results.replace(/divalNLine/gm,"\n")
1908 dwform.elements.fck_wikitext.value = results;
1915 dom.click();
1920 jQuery(document).ready(function() {
1922 jQuery( "#ebut_test" ).mousedown(function() {
1926 jQuery( "#ebtn__delete" ).click(function() {
1930 jQuery( "#ebtn__delete" ).mouseup(function() {
1934 jQuery( "#ebtn__dwedit" ).click(function() {
1938 this.form.submit();
1941 jQuery("#ebtn__fbswitch").click(function(){
1943 document.cookie = 'ckgFbOpt=ckgdoku;';
1945 document.cookie = 'ckgFbOpt=dokuwiki;';
1948 this.form.submit();
1951 jQuery( "#ckgdoku_draft_btn" ).click(function() {
1954 jQuery( "#backup_button" ).click(function() {
1957 jQuery( "#revert_to_prev_btn" ).click(function() {
1961 jQuery( "#no_styling_btn" ).click(function() {
1962 this.form.styling.value ="no_styles";
1963 this.form.prefix.value="";
1964 this.form.suffix.value="";
1965 this.form.rev.value="";
1968 jQuery( "#ebut_cancel" ).mouseup(function() {
1971 jQuery( "#save_button" ).mousedown(function() {
1972 if( this.form.template && this.form.template.value == 'tpl' ) window.dwfckTextChanged = true;
1973 if(!window.dwfckTextChanged && !JSINFO['cg_rev']) {