source: gs2-extensions/ngramj/src/wiki/wiki2xml/heading-fix.patch@ 25141

Last change on this file since 25141 was 25141, checked in by papitha, 12 years ago

NGRAMJ PERL MODULE ADDED /MAORI LANGUAGE GUESSING WORKING WELL!!

File size: 627 bytes
  • wiki2xml.php

     
    14491449       
    14501450        # Remove HTML comments
    14511451#    $this->w = str_replace ( "\n<!--" , "<!--" , $this->w ) ;
    1452         $this->w= preg_replace('/\n<!--(.|\s)*?-->\n/', "<!-- --> ", $this->w);
     1452        # Important: Do not remove leading \n, since it could be a heading delimiter
     1453        $this->w= preg_replace('/\n<!--(.|\s)*?-->\n/', "\n<!-- --> ", $this->w);
    14531454        $this->w= preg_replace('/<!--(.|\s)*?-->/', '', $this->w);
    14541455        $this->w= preg_replace('/<!--(.|\s)*$/', '', $this->w);
    14551456       
Note: See TracBrowser for help on using the repository browser.