Commits

Carl Meyer committed 3acf365

make markitup-inserted underline-style h1 and h2 headers minimum of 3 characters to work around python-markdown limitation; fixes #3

  • Participants
  • Parent commits 6798453

Comments (0)

Files changed (2)

 tip (unreleased)
 ----------------
 
+- enforce minimum length of 3 characters for MarkItUp!-inserted h1 and h2
+  underline-style headers (works around bug in python-markdown).  Thanks
+  Daemian Mack for the report.
+
 0.6.1 (2010.07.01)
 ------------------
 

markitup/media/markitup/sets/markdown/set.js

 	markdownTitle: function(markItUp, char) {
 		heading = '';
 		n = $.trim(markItUp.selection||markItUp.placeHolder).length;
+		// work around bug in python-markdown where header underlines must be at least 3 chars
+		if (n < 3) { n = 3; }
 		for(i = 0; i < n; i++) {
 			heading += char;
 		}