public
Description: The ultra-lightweight ultra-flexible blogging engine with a fetish for birds and misspellings.
Homepage: http://chyrp.net/
Clone URL: git://github.com/vito/chyrp.git
Click here to lend your support to: chyrp and make a donation at www.pledgie.com !
Fixed incorrect rejoining of paragraphs in the bookmarklet when
submitting a post wiht Tagginator enabled.
vito (author)
Thu Nov 06 12:49:00 -0800 2008
commit  69cb90bf89a13fc7ec09e1bd28d867a29a153910
tree    0ed22b0714fbed042461c58c060aa6823e4dfcdc
parent  13584a277aa9ee7b35c7c1686e9e5dacea1f53db
...
56
57
58
 
59
60
61
...
71
72
73
74
 
75
76
77
...
56
57
58
59
60
61
62
...
72
73
74
 
75
76
77
78
0
@@ -56,6 +56,7 @@
0
             $tags = array();
0
             foreach ($values as $key =>&$value) {
0
                 $paragraphs = preg_split("/([\r\n]{2,4})/", $value);
0
+                $rejoin = ((strlen($value) - strlen(implode("", $paragraphs)) / count($paragraphs)) == 4) ? "\r\n\r\n" : "\n\n" ;
0
 
0
                 foreach ($paragraphs as $index => &$paragraph)
0
                     # Look for #spaced tags# that get removed only in the last paragraph.
0
@@ -71,7 +72,7 @@
0
                         $paragraph = preg_replace("/(\s|^)#([^ .,]+)(?!#)/", "\\1\\2", $paragraph);
0
                     }
0
 
0
-                $value = str_replace("\\#", "#", implode("\r\n", $paragraphs));
0
+                $value = str_replace("\\#", "#", implode($mode, $paragraphs));
0
             }
0
 
0
             $_POST['tags'] = implode(", ", $tags);

Comments