Ticket #14 (assigned defect)

Opened 3 years ago

Last modified 2 years ago

Inline image syntax problem with multibyte string

Reported by: deveiant Owned by: deveiant
Priority: normal Milestone: Bugfixes
Component: MarkdownSyntax Version: 1.0.0fc2
Severity: normal Keywords: inline image multibyte character
Cc:

Description

Inline image syntax not work well with multibyte string. The role of "s" option of Regexp is different from Perl's. Patch attached.

(Patch inlined to work around stupid tmpfile problem in this Trac install)

diff -urN BlueCloth-1.0.0.orig/lib/bluecloth.rb BlueCloth-1.0.0/lib/bluecloth.rb
--- BlueCloth-1.0.0.orig/lib/bluecloth.rb	Wed Aug 25 14:27:15 2004
+++ BlueCloth-1.0.0/lib/bluecloth.rb	Fri Jan 28 02:23:08 2005
@@ -951,7 +951,7 @@
 			)?				# title is optional
 		  \)
 		)
-	  }xs #"
+	  }x #"
 
 
 	# Reference-style images
@@ -962,7 +962,7 @@
 			(?:\n[ ]*)?		# One optional newline + spaces
 			\[ (.*?) \]		# id = $3
 		)
-	  }xs
+	  }x
 
 	### Turn image markup into image tags.
 	def transform_images( str, rs )

Change History

Changed 3 years ago by deveiant

  • status changed from new to assigned

Changed 2 years ago by deveiant

  • milestone changed from Markdown 1.0.1 to Bugfixes
Note: See TracTickets for help on using tickets.