]> git.proxmox.com Git - pve-docs.git/commitdiff
pve-docs-mediawiki-import.in: avoid to add newlines
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 17 Oct 2016 09:51:43 +0000 (11:51 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 17 Oct 2016 09:51:43 +0000 (11:51 +0200)
pve-docs-mediawiki-import.in

index 851cbf9bdc6f031cafc7d7412e8ecbfc44fcf9d5..1dc4f2647c9a722c394d3f89b03eedde85bb6768 100755 (executable)
@@ -70,10 +70,8 @@ sub update_page {
 
     chomp $pve_content;
 
-    if ($page =~ m/^(.*)$starttag\n.*\n$endtag(.*)$/s) {
+    if ($page =~ m/^(.*)$starttag\n.*\n$endtag\n?(.*)$/s) {
        my ($top_content, $bottom_content) = ($1, $2);
-       chomp $top_content;
-       chomp $bottom_content;
        $page = $top_content;
        $page .= "$starttag\n";
        $page .= $pve_content;