Skip to content

Commit

Permalink
Merge pull request #302 from metanorma/features/white-paper
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Oct 9, 2023
2 parents 5e1fa9a + 9f31b5f commit 9caeaa0
Show file tree
Hide file tree
Showing 36 changed files with 12,799 additions and 1,503 deletions.
6 changes: 6 additions & 0 deletions lib/html2doc/ieee_wp.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require "html2doc/ieee_wp/lists"

class Html2Doc
class IEEE_WP
end
end
22 changes: 22 additions & 0 deletions lib/html2doc/ieee_wp/lists.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class Html2Doc
class IEEE_WP < ::Html2Doc
def list2para(list)
list.name == "ol" and return super
return if list.xpath("./li").empty?

list.xpath("./li/p").each do |p|
p["class"] ||= "BulletedList"
end
list.xpath("./li").each do |l|
l.name = "p"
l["class"] ||= "BulletedList"
next unless l.first_element_child&.name == "p"

l["style"] ||= ""
l["style"] += (l.first_element_child["style"]&.sub(/mso-list[^;]+;/, "") || "")
l.first_element_child.replace(l.first_element_child.children)
end
list.replace(list.children)
end
end
end
348 changes: 348 additions & 0 deletions lib/isodoc/ieee/html/header_wp.html

Large diffs are not rendered by default.

Loading

0 comments on commit 9caeaa0

Please sign in to comment.