Skip to content

Commit 280a679

Browse files
committed
Try without file read
1 parent 59a6ce0 commit 280a679

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

resources/asciidoctor/lib/chunker/url_to_v3.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ def initialize(doc)
1414
# raise ArgumentError, "Missing required attribute 'outdir'" if outdir.nil?
1515

1616
# Hardcoded file path
17-
file_path = File.expand_path('v3-mapping.json', __dir__)
18-
# Read content from the specified file and convert it to a dictionary
19-
mapping = JSON.parse(File.read(file_path)) if File.exist?(file_path)
17+
# file_path = File.expand_path('v3-mapping.json', __dir__)
18+
# # Read content from the specified file and convert it to a dictionary
19+
# mapping = JSON.parse(File.read(file_path)) if File.exist?(file_path)
2020

2121

2222
path_dir = outdir.sub('/tmp/docsbuild/target_repo/raw', '').split('/')[0...-1].join('/')
2323

2424
actual_url = '/guide' + path_dir + '/*/' + current_url
2525

2626

27-
if mapping.key?(actual_url)
28-
new_url = mapping[actual_url]
29-
else
27+
# if mapping.key?(actual_url)
28+
# new_url = mapping[actual_url]
29+
# else
3030
new_url = '/docs'
31-
end
31+
# end
3232

3333
@header = Asciidoctor::Block.new(doc, :pass, source: <<~HTML)
3434
<div id="url-to-v3">

0 commit comments

Comments
 (0)