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
82 changes: 71 additions & 11 deletions tests/norm-rule/expected/test-norm-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,75 @@
}
]
},
{
"name": "inline-anchors-in-paragraph",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:paragraph:inline-anchors-in-paragraph",
"text": "Paragraph with inline anchor and something.",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"name": "inline-anchors-in-tagged-paragraph",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:paragraph:inline-anchors-in-paragraph:inline-anchors",
"text": "inline anchor",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"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",
"tags": [
{
"name": "norm:para",
"text": "Paragraph anchor",
"name": "norm:paragraph:no-inline-anchors-in-paragraph",
"text": "Paragraph without inline anchors",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"name": "table1",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:table:anchors-in-cells:entire-table",
"text": "===\n cell with anchor\ncell without anchor\n===",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"name": "table2",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:table:no-anchors-in-cells:entire-table",
"text": "Header 1|Header 2\n===\nCell in column 1, row 1|Cell in column 2, row 1\nCell in column 1, row 2|Cell in column 2, row 2\n===",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"name": "unordered1",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:unordered-list:anchors-in-items:entire-list",
"text": "Unordered List with anchors:",
"tag_filename": "/build/test-norm-tags.json"
}
]
Expand All @@ -42,13 +102,13 @@
"description": "One line description",
"tags": [
{
"name": "norm:note-1",
"text": "Multi-paragraph note 1",
"name": "norm:admonition:anchors-in-notes:note1",
"text": "Paragraph 1",
"tag_filename": "/build/test-norm-tags.json"
},
{
"name": "norm:note-3",
"text": "Multi-paragraph note 3",
"name": "norm:admonition:anchors-in-notes:note3",
"text": "Paragraph 3",
"tag_filename": "/build/test-norm-tags.json"
}
]
Expand All @@ -59,12 +119,12 @@
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:description-item-1",
"name": "norm:description-list:anchors-in-items:item1",
"text": "Description Item 1",
"tag_filename": "/build/test-norm-tags.json"
},
{
"name": "norm:description-item-3",
"name": "norm:description-list:anchors-in-items:item3",
"text": "Description Item 3",
"tag_filename": "/build/test-norm-tags.json"
}
Expand All @@ -76,12 +136,12 @@
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:description-item-1",
"name": "norm:description-list:anchors-in-items:item1",
"text": "Description Item 1",
"tag_filename": "/build/test-norm-tags.json"
},
{
"name": "norm:description-item-3",
"name": "norm:description-list:anchors-in-items:item3",
"text": "Description Item 3",
"tag_filename": "/build/test-norm-tags.json"
}
Expand All @@ -94,7 +154,7 @@
"tags": [
{
"name": "norm:tag_with_newlines",
"text": "Here’s the first line.\nHere’s the second line.",
"text": "Here’s the first line. Here’s the second line.",
"tag_filename": "/build/test-norm-tags.json"
}
]
Expand Down
Binary file modified tests/norm-rule/expected/test-norm-rules.xlsx
Binary file not shown.
118 changes: 93 additions & 25 deletions tests/norm-rule/expected/test-norm-tags.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,118 @@
{
"tags": {
"norm:inline": "inside inline",
"norm:tag_with_newlines": "Here’s the first line.\nHere’s the second line.",
"norm:para": "Paragraph anchor",
"norm:table-name-empty-tag-just-anchor": "",
"norm:unordered-list-heading": "Unordered List:",
"norm:ordered-list-heading": "Ordered List:",
"norm:description-item-1": "Description Item 1",
"norm:description-item-3": "Description Item 3",
"norm:note-1": "Multi-paragraph note 1",
"norm:note-3": "Multi-paragraph note 3"
"norm:tag_with_newlines": "Here’s the first line. Here’s the second line.",
"norm:paragraph:no-inline-anchors-in-paragraph": "Paragraph without inline anchors",
"norm:paragraph:inline-anchors-in-paragraph:inline-anchors": "inline anchor",
"norm:paragraph:inline-anchors-in-paragraph": "Paragraph with inline anchor and something.",
"norm:table:anchors-in-cells:cell": "",
"norm:table:anchors-in-cells:entire-table": "===\n cell with anchor\ncell without anchor\n===",
"norm:table:no-anchors-in-cells:entire-table": "Header 1|Header 2\n===\nCell in column 1, row 1|Cell in column 2, row 1\nCell in column 1, row 2|Cell in column 2, row 2\n===",
"norm:unordered-list:anchors-in-items:entire-list": "Unordered List with anchors:",
"norm:unordered-list:anchors-in-items:item1": "",
"norm:unordered-list:anchors-in-items:item2": "",
"norm:unordered-list:no-anchors-in-items:entire-list": "Unordered List without anchors:",
"norm:unordered-list:multiple-levels": "Zca and not F\nZca, Zcf and F (but not D) is specified (RV32 only)\nZca, Zcf and Zcd if D is specified (RV32 only)\n\nthis configuration excludes Zcmp, Zcmt\nZca, Zcd if D is specified (RV64 only)\n\nthis configuration excludes Zcmp, Zcmt",
"norm:ordered-list:anchors-in-items:entire-list": "Ordered List with anchors:",
"norm:ordered-list:anchors-in-items:item1": "",
"norm:ordered-list:anchors-in-items:item2": "",
"norm:ordered-list:no-anchors-in-items:entire-list": "Ordered List without anchors:",
"norm:description-list:anchors-in-items:item1": "Description Item 1",
"norm:description-list:anchors-in-items:item3": "Description Item 3",
"norm:description-list:no-anchors-in-items:entire-list": "Description List without anchors in items:",
"norm:admonition:single-paragraph-note": "",
"norm:admonition:anchors-in-notes:note1": "Paragraph 1",
"norm:admonition:anchors-in-notes:note3": "Paragraph 3",
"norm:admonition:anchors-in-notes:entire-note": "Paragraph 1\n\nParagraph 2\n\nParagraph 3",
"norm:admonition:no-anchors-in-notes:entire-note": "Paragraph 1\n\nParagraph 2\n\nParagraph 3",
"norm:admonition:only-anchors-in-notes:note1": "Paragraph 1",
"norm:admonition:only-anchors-in-notes:note3": "Paragraph 3"
},
"sections": {
"title": "",
"id": "",
"children": [
{
"title": "Chapter 1",
"id": "_chapter_1",
"title": "Chapter 1 - Basic Tagging",
"id": "_chapter_1_basic_tagging",
"children": [
{
"title": "Chapter 1.1",
"id": "_chapter_1_1",
"title": "Chapter 1.1 - Inline Tagging",
"id": "_chapter_1_1_inline_tagging",
"children": [],
"tags": [
"norm:para",
"norm:table-name-empty-tag-just-anchor"
"norm:inline",
"norm:tag_with_newlines"
]
},
{
"title": "Chapter 1.2 - Paragraph Tagging",
"id": "_chapter_1_2_paragraph_tagging",
"children": [],
"tags": [
"norm:paragraph:no-inline-anchors-in-paragraph",
"norm:paragraph:inline-anchors-in-paragraph:inline-anchors",
"norm:paragraph:inline-anchors-in-paragraph"
]
},
{
"title": "Chapter 2 - Table Tagging",
"id": "_chapter_2_table_tagging",
"children": [],
"tags": [
"norm:table:anchors-in-cells:cell",
"norm:table:anchors-in-cells:entire-table",
"norm:table:no-anchors-in-cells:entire-table"
]
}
],
"tags": []
},
{
"title": "Chapter 3 - Tagging Unordered Lists",
"id": "_chapter_3_tagging_unordered_lists",
"children": [],
"tags": [
"norm:unordered-list:anchors-in-items:entire-list",
"norm:unordered-list:anchors-in-items:item1",
"norm:unordered-list:anchors-in-items:item2",
"norm:unordered-list:no-anchors-in-items:entire-list",
"norm:unordered-list:multiple-levels"
]
},
{
"title": "Chapter 4 - Tagging Ordered Lists",
"id": "_chapter_4_tagging_ordered_lists",
"children": [],
"tags": [
"norm:ordered-list:anchors-in-items:entire-list",
"norm:ordered-list:anchors-in-items:item1",
"norm:ordered-list:anchors-in-items:item2",
"norm:ordered-list:no-anchors-in-items:entire-list"
]
},
{
"title": "Chapter 5 - Tagging Description Lists",
"id": "_chapter_5_tagging_description_lists",
"children": [],
"tags": [
"norm:inline",
"norm:tag_with_newlines"
"norm:description-list:anchors-in-items:item1",
"norm:description-list:anchors-in-items:item3",
"norm:description-list:no-anchors-in-items:entire-list"
]
},
{
"title": "Chapter 2",
"id": "_chapter_2",
"title": "Chapter 6 - Tagging Admonitions",
"id": "_chapter_6_tagging_admonitions",
"children": [],
"tags": [
"norm:unordered-list-heading",
"norm:ordered-list-heading",
"norm:description-item-1",
"norm:description-item-3",
"norm:note-1",
"norm:note-3"
"norm:admonition:single-paragraph-note",
"norm:admonition:anchors-in-notes:note1",
"norm:admonition:anchors-in-notes:note3",
"norm:admonition:anchors-in-notes:entire-note",
"norm:admonition:no-anchors-in-notes:entire-note",
"norm:admonition:only-anchors-in-notes:note1",
"norm:admonition:only-anchors-in-notes:note3"
]
}
],
Expand Down
Loading