Skip to content

Commit

Permalink
Fix inline comment regexp for v2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kirsle committed Aug 26, 2016
1 parent c245219 commit a9b3961
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Revision history for Perl extension RiveScript.

2.0.3 Aug 26 2016
- Fix inline comment regexp that was making URLs impossible to represent
in replies.

2.0.2 Jan 11 2016
- Fix typo in changelog.

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ defines the standards of RiveScript.
# CHANGES
2.0.3 Aug 26 2016
- Fix inline comment regexp that was making URLs impossible to represent
in replies.
2.0.0 Dec 28 2015
- Switch from old-style floating point version number notation to dotted
decimal notation. This bumps the version number to `2.0.0` because the next
Expand Down
2 changes: 1 addition & 1 deletion docs/RiveScript.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title></title>
<link rel="stylesheet" href="rivescript.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:nlo@osx004.apple.com" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body>
Expand Down
10 changes: 7 additions & 3 deletions lib/RiveScript.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use warnings;

# Version of the Perl RiveScript interpreter. This must be on a single line!
# See `perldoc version`
use version; our $VERSION = version->declare('v2.0.2');
use version; our $VERSION = version->declare('v2.0.3');

our $SUPPORT = '2.0'; # Which RS standard we support.
our $basedir = (__FILE__ =~ /^(.+?)\.pm$/i ? $1 : '.');
Expand Down Expand Up @@ -471,10 +471,10 @@ sub parse {

# Ignore inline comments if there's a space before and after
# the // or # symbols.
my $inline_comment_regexp = "(\\s+\\#\\s+|\\/\\/)";
my $inline_comment_regexp = qr/(\s+#\s+|\s+\/\/)/;
$line =~ s/\\\/\//\\\/\\\//g; # Turn \// into \/\/
if ($cmd eq '+') {
$inline_comment_regexp = "(\\s\\s\\#|\\/\\/)";
$inline_comment_regexp = qr/(\s\s#|\s+\/\/)/;
if ($line =~ /\s\s#\s/) {
# Deprecated.
$self->issue ("Using the # symbol for comments is deprecated at $fname line $lineno (near: $line).");
Expand Down Expand Up @@ -3381,6 +3381,10 @@ L<http://www.rivescript.com/> - The official homepage of RiveScript.
=head1 CHANGES
2.0.3 Aug 26 2016
- Fix inline comment regexp that was making URLs impossible to represent
in replies.
2.0.2 Jan 11 2016
- Fix typo in changelog.
Expand Down
2 changes: 1 addition & 1 deletion lib/RiveScript/WD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use warnings;

# Version of the Perl RiveScript interpreter. This must be on a single line!
# See `perldoc version`
use version; our $VERSION = version->declare('v2.0.2');
use version; our $VERSION = version->declare('v2.0.3');

# This is not a real module; it's only a current copy of the RiveScript
# Working Draft. See the latest version at
Expand Down

0 comments on commit a9b3961

Please sign in to comment.