You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2018. It is now read-only.
FILE: parser/pb_parser.php
private function _strip_comments(&$string)
{
$string = preg_replace('/\/\/.+/', '', $string);
// now replace empty lines and whitespaces in front
$string = preg_replace('/\\r?\\n\s*/', "\n", $string);
}
The first preg_replace() call in the _strip_comments() function is used to
strip out comments from a proto message. However, there might be no
characters after the precending '//'.
Example:
//
// COMMENT
//
So the regular expression should be written in the form of '/\/\/.*/' to
match any characters (except newline) that has zero or more duplicates.
Original issue reported on code.google.com by che...@gmail.com on 8 Apr 2009 at 1:51
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
che...@gmail.com
on 8 Apr 2009 at 1:51The text was updated successfully, but these errors were encountered: