Skip to content

Commit

Permalink
add bookmark span tags to headers (#340)
Browse files Browse the repository at this point in the history
Co-authored-by: Johnathan Aspinwall <[email protected]>
  • Loading branch information
J-Oliveros and jwaspin authored Feb 7, 2024
1 parent 2cef4b9 commit 080439f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/adiwg/mdtranslator/writers/simple_html/sections/html_body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def writeHtml(version, intObj)
unless aContacts.empty?
@html.div do
@html.h2('Contacts', {'id' => 'body-contacts', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-contacts'})
@html.div(:class => 'block') do
aContacts.each do |hContact|
@html.div(:class => 'block') do
Expand All @@ -144,6 +145,7 @@ def writeHtml(version, intObj)
unless hMetaInfo.empty?
@html.div do
@html.h2('Metadata Information', {'id' => 'body-metadataInfo', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-metadataInfo'})
@html.div(:class => 'block') do
@html.div(:class => 'block') do
metaInfoClass.writeHtml(hMetaInfo)
Expand All @@ -157,7 +159,8 @@ def writeHtml(version, intObj)
unless hResourceInfo.empty?
@html.div do
@html.h2('Resource Information', {'id' => 'body-resourceInfo', 'class' => 'h2'})
@html.div(:class => 'block') do
@html.span('', {'style' => 'mso-bookmark:body-resourceInfo'})
@html.div(:class => 'block') do
resourceClass.writeHtml(hResourceInfo)
end
@html.hr
Expand All @@ -167,6 +170,7 @@ def writeHtml(version, intObj)
unless aDataQuality.nil? || aDataQuality.empty?
@html.div do
@html.h2('Data Quality', {'id' => 'body-dataQuality', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-dataQuality'})
aDataQuality.each do |hDataQuality|
@html.div(:class => 'block') do
dataQualityClass.writeHtml(hDataQuality)
Expand All @@ -179,6 +183,7 @@ def writeHtml(version, intObj)
unless aLineage.empty?
@html.div do
@html.h2('Resource Lineage', {'id' => 'body-lineage', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-lineage'})
@html.div(:class => 'block') do
aLineage.each do |hLineage|
@html.div do
Expand All @@ -197,6 +202,7 @@ def writeHtml(version, intObj)
unless aDistribution.empty?
@html.div do
@html.h2('Resource Distribution', {'id' => 'body-distribution', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-distribution'})
@html.div(:class => 'block') do
aDistribution.each do |hDistribution|
@html.div do
Expand All @@ -215,6 +221,7 @@ def writeHtml(version, intObj)
unless aAssociated.empty?
@html.div do
@html.h2('Associated Resources', {'id' => 'body-associatedResource', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-associatedResource'})
@html.div(:class => 'block') do
aAssociated.each do |hAssociated|
@html.div do
Expand All @@ -233,6 +240,7 @@ def writeHtml(version, intObj)
unless aAdditional.empty?
@html.div do
@html.h2('Additional Documentation', {'id' => 'body-additionalDocument', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-additionalDocument'})
@html.div(:class => 'block') do
aAdditional.each do |hAdditional|
@html.div do
Expand All @@ -251,6 +259,7 @@ def writeHtml(version, intObj)
unless aDictionaries.empty?
@html.div do
@html.h2('Data Dictionaries', {'id' => 'body-dataDictionary', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-dataDictionary'})
@html.div(:class => 'block') do
aDictionaries.each do |hDictionary|
@html.div do
Expand All @@ -268,6 +277,7 @@ def writeHtml(version, intObj)
unless aFunding.empty?
@html.div do
@html.h2('Funding', {'id' => 'body-funding', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-funding'})
@html.div(:class => 'block') do
aFunding.each do |hFunding|
@html.div do
Expand All @@ -285,6 +295,7 @@ def writeHtml(version, intObj)
unless aRepositories.empty?
@html.div do
@html.h2('Metadata Repositories', {'id' => 'body-repository', 'class' => 'h2'})
@html.span('', {'style' => 'mso-bookmark:body-repository'})
@html.div(:class => 'block') do
aRepositories.each do |hRepository|
@html.div do
Expand Down

0 comments on commit 080439f

Please sign in to comment.