Skip to content

Commit

Permalink
fix xref target
Browse files Browse the repository at this point in the history
  • Loading branch information
masao committed Feb 11, 2024
1 parent 52680ab commit 52c370f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _pdf/convert-adoc2pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
FileUtils.cp(files, d)
header_regex = /\A---.*?---/m
toc_regex = /^include::.*_toc.*$/
xref_regex = /(xref:enju_\w+)_\d+\.adoc/
Dir.glob(File.join(d, "*.adoc")).each do |file|
#STDERR.puts file
cont = open(file).read
content_adoc = cont.sub(header_regex, "").strip
content_adoc = content_adoc.gsub(toc_regex, "")
content_adoc = content_adoc.gsub(xref_regex, '\1_all.adoc')
open(file, "w"){|io| io.print(content_adoc) }
end
%w[ enju_install_vm.adoc
Expand Down

0 comments on commit 52c370f

Please sign in to comment.