lib/kramdown/parser/kramdown/link.rb in kramdown-1.3.1 vs lib/kramdown/parser/kramdown/link.rb in kramdown-1.3.2
- old
+ new
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
#
#--
-# Copyright (C) 2009-2013 Thomas Leitner <t_leitner@gmx.at>
+# Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
@@ -11,10 +11,10 @@
module Parser
class Kramdown
# Normalize the link identifier.
def normalize_link_id(id)
- id.gsub(/(\s|\n)+/, ' ').downcase
+ id.gsub(/[\s\n]+/, ' ').downcase
end
LINK_DEFINITION_START = /^#{OPT_SPACE}\[([^\n\]]+)\]:[ \t]*(?:<(.*?)>|([^'"\n]*?\S[^'"\n]*?))[ \t]*?(?:\n?[ \t]*?(["'])(.+?)\4[ \t]*?)?\n/
# Parse the link definition at the current location.