-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NBSP in SDO erefs: metanorma/metanorma-iso#882
- Loading branch information
Showing
9 changed files
with
84 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
term_def_boilerplate: | ||
no_terms_boilerplate: | ||
internal_terms_boilerplate: | ||
external_terms_boilerplate: | ||
internal_external_terms_boilerplate: | ||
term_def_boilerplate: "" | ||
no_terms_boilerplate: "" | ||
internal_terms_boilerplate: "" | ||
external_terms_boilerplate: "" | ||
internal_external_terms_boilerplate: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,45 @@ | ||
module IsoDoc::Ietf | ||
class RfcConvert < ::IsoDoc::Convert | ||
def table_attrs(node) | ||
attr_code(anchor: node["id"], align: node["align"]) | ||
end | ||
module IsoDoc | ||
module Ietf | ||
class RfcConvert < ::IsoDoc::Convert | ||
def table_attrs(node) | ||
attr_code(anchor: node["id"], align: node["align"]) | ||
end | ||
|
||
def table_parse(node, out) | ||
@in_table = true | ||
out.table **table_attrs(node) do |t| | ||
table_title_parse(node, out) | ||
thead_parse(node, t) | ||
tbody_parse(node, t) | ||
tfoot_parse(node, t) | ||
def table_parse(node, out) | ||
@in_table = true | ||
out.table **table_attrs(node) do |t| | ||
table_title_parse(node, out) | ||
thead_parse(node, t) | ||
tbody_parse(node, t) | ||
tfoot_parse(node, t) | ||
end | ||
(dl = node.at(ns("./dl"))) && parse(dl, out) | ||
node.xpath(ns("./note")).each { |n| parse(n, out) } | ||
@in_table = false | ||
end | ||
(dl = node.at(ns("./dl"))) && parse(dl, out) | ||
node.xpath(ns("./note")).each { |n| parse(n, out) } | ||
@in_table = false | ||
end | ||
|
||
def table_title_parse(node, out) | ||
name = node.at(ns("./name")) || return | ||
out.name do |p| | ||
name.children.each { |n| parse(n, p) } | ||
def table_title_parse(node, out) | ||
name = node.at(ns("./name")) || return | ||
out.name do |p| | ||
name.children.each { |n| parse(n, p) } | ||
end | ||
end | ||
end | ||
|
||
def tr_parse(node, out, ord, totalrows, header) | ||
out.tr do |r| | ||
node.elements.each do |td| | ||
attrs = make_tr_attr(td, ord, totalrows - 1, header) | ||
r.send td.name, **attrs do |entry| | ||
td.children.each { |n| parse(n, entry) } | ||
def tr_parse(node, out, ord, totalrows, header) | ||
out.tr do |r| | ||
node.elements.each do |td| | ||
attrs = make_tr_attr(td, ord, totalrows - 1, header) | ||
r.send td.name, **attrs do |entry| | ||
td.children.each { |n| parse(n, entry) } | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
def make_tr_attr(td, row, totalrows, header) | ||
attr_code(rowspan: td["rowspan"], colspan: td["colspan"], | ||
align: td["align"] ) | ||
def make_tr_attr(cell, _row, _totalrows, _header) | ||
attr_code(rowspan: cell["rowspan"], colspan: cell["colspan"], | ||
align: cell["align"]) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module Metanorma | ||
module Ietf | ||
VERSION = "3.1.1".freeze | ||
VERSION = "3.1.2".freeze | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.