mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-29 01:27:00 +03:00
Use string concatenation instead of array concatenation
This commit is contained in:
parent
5e3d52927a
commit
d21a5a6836
@ -165,17 +165,15 @@ class Token
|
||||
|
||||
endIndex = match.index
|
||||
|
||||
fragments = [leadingHtml]
|
||||
|
||||
html = leadingHtml
|
||||
if @value.length > MaxTokenLength
|
||||
while startIndex < endIndex
|
||||
fragments.push "<span>" + @escapeString(@value, startIndex, startIndex + MaxTokenLength) + "</span>"
|
||||
html += "<span>" + @escapeString(@value, startIndex, startIndex + MaxTokenLength) + "</span>"
|
||||
startIndex += MaxTokenLength
|
||||
else
|
||||
fragments.push @escapeString(@value, startIndex, endIndex)
|
||||
html += @escapeString(@value, startIndex, endIndex)
|
||||
|
||||
fragments.push trailingHtml
|
||||
html = fragments.join('')
|
||||
html += trailingHtml
|
||||
html
|
||||
|
||||
escapeString: (str, startIndex, endIndex) ->
|
||||
|
Loading…
Reference in New Issue
Block a user