Skip to content

Commit

Permalink
More strict email autoliking
Browse files Browse the repository at this point in the history
  • Loading branch information
vmg committed Jun 2, 2011
1 parent 2d249cc commit 382d82f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ext/redcarpet/markdown.c
Expand Up @@ -878,7 +878,7 @@ char_autolink_email(struct buf *ob, struct render *rndr, char *data, size_t offs
if (isalnum(c))
continue;

if (strchr(".!#$%&*+-/=?^_`|~", c) != NULL)
if (strchr(".+-_", c) != NULL)
continue;

break;
Expand All @@ -895,7 +895,7 @@ char_autolink_email(struct buf *ob, struct render *rndr, char *data, size_t offs

if (c == '@')
nb++;
else if (c == '.')
else if (c == '.' && link_end < size - 1)
np++;
else if (c != '-' && c != '_')
break;
Expand Down
4 changes: 2 additions & 2 deletions ext/redcarpet/markdown.h
Expand Up @@ -21,10 +21,10 @@

#include "buffer.h"

#define UPSKIRT_VERSION "1.15.1"
#define UPSKIRT_VERSION "1.15.2"
#define UPSKIRT_VER_MAJOR 1
#define UPSKIRT_VER_MINOR 15
#define UPSKIRT_VER_REVISION 1
#define UPSKIRT_VER_REVISION 2

/********************
* TYPE DEFINITIONS *
Expand Down
2 changes: 1 addition & 1 deletion lib/redcarpet.rb
Expand Up @@ -26,7 +26,7 @@
# end
#
class Redcarpet
VERSION = '1.15.1'
VERSION = '1.15.2'

# Original Markdown formatted text.
attr_reader :text
Expand Down
2 changes: 1 addition & 1 deletion redcarpet.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'redcarpet'
s.version = '1.15.1'
s.version = '1.15.2'
s.summary = "Ruby bindings for libupskirt"
s.description = 'A fast and safe Markdown to (X)HTML parser'
s.date = '2011-06-02'
Expand Down
2 changes: 1 addition & 1 deletion upskirt
Submodule upskirt updated from c631d9 to 79e9a7

0 comments on commit 382d82f

Please sign in to comment.