Skip to content

Commit 23f28c8

Browse files
committed
test
1 parent 280a679 commit 23f28c8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

resources/asciidoctor/lib/chunker/url_to_v3.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ def initialize(doc)
1818
# # Read content from the specified file and convert it to a dictionary
1919
# mapping = JSON.parse(File.read(file_path)) if File.exist?(file_path)
2020

21-
22-
path_dir = outdir.sub('/tmp/docsbuild/target_repo/raw', '').split('/')[0...-1].join('/')
21+
path_dir = if segments.empty?
22+
''
23+
elsif segments.length > 1
24+
segments[0...-1].join('/')
25+
else
26+
segments[0]
27+
end
2328

2429
actual_url = '/guide' + path_dir + '/*/' + current_url
2530

0 commit comments

Comments
 (0)