Skip to content

Commit 3417d5b

Browse files
committed
better xmlTemplater@replacexmltag
1 parent 15d9c6a commit 3417d5b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

coffee/xmlTemplater.coffee

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,11 @@ module.exports=class XmlTemplater #abstract class !!
142142

143143
options=
144144
xmlTagNumber:@templaterState.tagStart.numXmlTag
145+
noStartTag:@templaterState.matches[@templaterState.tagStart.numXmlTag].first?
145146

147+
options.insideValue=newValue
146148
if !@templaterState.matches[@templaterState.tagStart.numXmlTag].first? and !@templaterState.matches[@templaterState.tagStart.numXmlTag].last? #normal case
147149
options.insideValue=leftValue+newValue
148-
else #if the content starts with: {tag</w:t> (when handling recursive cases)
149-
options.insideValue=newValue
150-
options.noStartTag=@templaterState.matches[@templaterState.tagStart.numXmlTag].first?
151150

152151
content= @replaceXmlTag(content,options)
153152

0 commit comments

Comments
 (0)