mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-17 14:19:05 +08:00
Rename variable text_array to lines
This commit is contained in:
parent
541533546c
commit
ac8149c458
1 changed files with 3 additions and 3 deletions
|
|
@ -23,14 +23,14 @@ module Reports::Docx::DrawStepChecklist
|
||||||
@docx.ul do
|
@docx.ul do
|
||||||
items.each do |item|
|
items.each do |item|
|
||||||
li do
|
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
|
# Add the text line
|
||||||
text line
|
text line
|
||||||
|
|
||||||
# If this isn't the last line in the array, start a new paragraph for the next 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
|
end
|
||||||
|
|
||||||
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
|
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue