Skip to content

Commit

Permalink
fix(lint): rubocop linting
Browse files Browse the repository at this point in the history
  • Loading branch information
as-op committed Feb 7, 2024
1 parent 7d4a051 commit 1fb4600
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
3 changes: 0 additions & 3 deletions lib/md_to_pdf/elements/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ def data_inlinehtml_tag(tag, node, opts)
# ignore html comments
when 'img'
result.push({ image: sub.attr('src') })
when 'input'
data_array, current_opts = handle_unknown_inline_html_tag(sub, node, current_opts)
result.concat(data_array)
when 'ul', 'ol'
result.concat(data_inlinehtml_list_tag(sub, node, opts))
when 'label', 'p', 'li'
Expand Down
2 changes: 1 addition & 1 deletion lib/md_to_pdf/elements/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def draw_list(node, opts)
end
end

def data_html_list(tag, node, opts)
def data_html_list(tag, _node, opts)
level = count_list_level_html(tag)
is_ordered = tag.name.downcase == 'ol'
is_task_list = !tag.search("input[type=checkbox]").first.nil?
Expand Down
28 changes: 14 additions & 14 deletions spec/markdown_to_pdf/table_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@
it 'creates a html table with lists inside' do
generator.parse_file('table/list_in_cell.md')
expect_pdf([
{x:36.0, y:744.756, text:"• test1"},
{x:36.0, y:730.884, text:"• test2"},
{x:36.0, y:717.012, text:"  test2cont"},
{x:36.0, y:703.14, text:"• test3"},
{x:36.0, y:689.268, text:"  • test3.1"},
{x:36.0, y:675.396, text:"  • test3.2"},
{x:36.0, y:661.524, text:"    test3.2cont"},
{x:36.0, y:647.652, text:"  • test3.3"},
{x:216.0, y:744.756, text:"[ ] aha"},
{x:216.0, y:730.884, text:"[x] oho"},
{x:216.0, y:717.012, text:"[ ] ehe"},
{x:396.0, y:744.756, text:"1. wooo"},
{x:396.0, y:730.884, text:"2. waaa"},
{x:396.0, y:717.012, text:"3. wiiiii"}])
{ x: 36.0, y: 744.756, text: "• test1" },
{ x: 36.0, y: 730.884, text: "• test2" },
{ x: 36.0, y: 717.012, text: "  test2cont" },
{ x: 36.0, y: 703.14, text: "• test3" },
{ x: 36.0, y: 689.268, text: "  • test3.1" },
{ x: 36.0, y: 675.396, text: "  • test3.2" },
{ x: 36.0, y: 661.524, text: "    test3.2cont" },
{ x: 36.0, y: 647.652, text: "  • test3.3" },
{ x: 216.0, y: 744.756, text: "[ ] aha" },
{ x: 216.0, y: 730.884, text: "[x] oho" },
{ x: 216.0, y: 717.012, text: "[ ] ehe" },
{ x: 396.0, y: 744.756, text: "1. wooo" },
{ x: 396.0, y: 730.884, text: "2. waaa" },
{ x: 396.0, y: 717.012, text: "3. wiiiii" }])
end
end

0 comments on commit 1fb4600

Please sign in to comment.