Rename variable text_array to lines

This commit is contained in:
Ivan Kljun 2023-08-02 13:54:07 +02:00
parent 541533546c
commit ac8149c458

View file

@ -23,14 +23,14 @@ module Reports::Docx::DrawStepChecklist
@docx.ul do
items.each do |item|
li do
text_array = SmartAnnotations::TagToText.new(user, team, item.text).text.split("\n")
lines = SmartAnnotations::TagToText.new(user, team, item.text).text.split("\n")
text_array.each_with_index do |line, index|
lines.each_with_index do |line, index|
# Add the text line
text line
# If this isn't the last line in the array, start a new paragraph for the next line
br if index < text_array.length - 1
br if index < lines.length - 1
end
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked