mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-11-04 09:33:00 +00:00 
			
		
		
		
	Merge branch 'master' into parameterised-transclusions
This commit is contained in:
		@@ -58,7 +58,7 @@ exports.parse = function() {
 | 
			
		||||
	var reEnd;
 | 
			
		||||
	if(this.match[3]) {
 | 
			
		||||
		// If so, the end of the body is marked with \end
 | 
			
		||||
		reEnd = new RegExp("(\\r?\\n\\s*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
 | 
			
		||||
		reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
 | 
			
		||||
	} else {
 | 
			
		||||
		// Otherwise, the end of the definition is marked by the end of the line
 | 
			
		||||
		reEnd = /($|\r?\n)/mg;
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,22 @@
 | 
			
		||||
title: Macros/TrailingNewlines
 | 
			
		||||
description: Trailing newlines in macros must not be dropped
 | 
			
		||||
type: text/vnd.tiddlywiki-multiple
 | 
			
		||||
tags: [[$:/tags/wiki-test-spec]]
 | 
			
		||||
 | 
			
		||||
title: Output
 | 
			
		||||
 | 
			
		||||
\define inner()
 | 
			
		||||
Paragraph 1
 | 
			
		||||
 | 
			
		||||
Paragraph 2
 | 
			
		||||
\end
 | 
			
		||||
\define outer()
 | 
			
		||||
<$macrocall $name=inner />
 | 
			
		||||
 | 
			
		||||
\end
 | 
			
		||||
<<outer>>
 | 
			
		||||
 | 
			
		||||
+
 | 
			
		||||
title: ExpectedResult
 | 
			
		||||
 | 
			
		||||
<p>Paragraph 1</p><p>Paragraph 2</p>
 | 
			
		||||
		Reference in New Issue
	
	Block a user