Skip to content

Commit 10085d3

Browse files
committed
moved image processing after the fig processing
1 parent 3f8e587 commit 10085d3

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

‎script/html.rb‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ def do_replacements(html, type = :html)
1313
# Uv.parse(code, "xhtml", "ruby", false, "mac_classic")
1414
#end
1515

16-
# fix images in pdf
17-
if type == :pdf
18-
html = html.gsub /src="images/ do |img|
19-
'src="assets/images'
20-
end
21-
end
22-
16+
2317
# replace gitlinks
2418
html = html.gsub /linkgit:.*?\[\d\]/ do |code|
2519
if match = /linkgit:(.*?)\[/.match(code)
@@ -36,6 +30,13 @@ def do_replacements(html, type = :html)
3630
code
3731
end
3832

33+
# fix images in pdf
34+
if type == :pdf
35+
html = html.gsub /src="images/ do |img|
36+
'src="assets/images'
37+
end
38+
end
39+
3940
# replace/remove gitcasts
4041

4142
html = html.gsub /\[gitcast:.*?\]\(.*?\)/ do |code|

0 commit comments

Comments
 (0)