Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/norm-rule/expected/test-norm-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]
},
{
"name": "paragraph",
"name": "paragraph-with-a-really-wide-rule-name",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"description": "Here's a description.\nIt's got 2 lines.\n",
Expand All @@ -39,7 +39,7 @@
"instances": [
"MY_PARAMETER"
],
"description": "Here's a one line description.",
"description": "Here's a one line description but it is very wide so should wrap within a cell.",
"tags": [
{
"name": "norm:note-1",
Expand Down
Binary file modified tests/norm-rule/expected/test-norm-rules.xlsx
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/norm-rule/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ normative_rule_definitions:
kind: extension
instances: [Zicsr, ABC]
tags: ["norm:inline"]
- name: paragraph
- name: paragraph-with-a-really-wide-rule-name
description: |
Here's a description.
It's got 2 lines.
tags: ["norm:para"]
- name: note_with_2_tags
description: Here's a one line description.
description: Here's a one line description but it is very wide so should wrap within a cell.
kind: parameter
instances: [MY_PARAMETER]
tags: ["norm:note-1", "norm:note-3"]
Expand Down
6 changes: 5 additions & 1 deletion tools/create_normative_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def output_xlsx(filename, defs, tags)
right_arrow = "\u2192"
defs.norm_rule_defs.each do |d|
worksheet.write(row_num, 0, d.chapter_name)
worksheet.write(row_num, 1, d.name)
worksheet.write(row_num, 1, d.name, wrap_format)
worksheet.write(row_num, 2, d.summary) unless d.summary.nil?
worksheet.write(row_num, 3, d.description.chomp, wrap_format) unless d.description.nil?
worksheet.write(row_num, 4, d.kind) unless d.kind.nil?
Expand Down Expand Up @@ -626,6 +626,10 @@ def output_xlsx(filename, defs, tags)
# Set column widths to hold data width.
worksheet.autofit

# Override autofit for really wide columns
worksheet.set_column(1, 1, 20) # name column
worksheet.set_column(3, 3, 30) # description column

workbook.close
end

Expand Down