forked from Sokomine/yl_speak_up
		
	handled missing text in textual replacements
This commit is contained in:
		
							parent
							
								
									9fadc666ae
								
							
						
					
					
						commit
						47f9c83358
					
				@ -38,7 +38,7 @@ yl_speak_up.replace_vars_in_text = function(text, dialog, pname)
 | 
			
		||||
	-- substitutions in it using substring captured by "()" in
 | 
			
		||||
	-- pattern. "[%a_]+" means one or more letter or underscore.
 | 
			
		||||
	-- If lookup returns nil, then no substitution is made.
 | 
			
		||||
	text = string.gsub(text, "%$([%a_]+)%$", subs)
 | 
			
		||||
	text = string.gsub(text or "", "%$([%a_]+)%$", subs)
 | 
			
		||||
 | 
			
		||||
	return text
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user