Skip to content

Commit d51c252

Browse files
committed
update-docs: accommodate for changes in Git v2.48.0
As of Git's 9219325be74 (Documentation: allow sourcing generated includes from separate dir, 2024-12-06), there are no regular `include::<path>` statements left that were expected by the `update-docs.rb` script, but they are now `include::{build_dir}/<path>` instead. Let's accommodate for that. This fixes git#1941 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 6843a48 commit d51c252

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script/update-docs.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def wrap_front_matter(front_matter)
4848
end
4949

5050
def expand_l10n(path, content, get_f_content, categories)
51-
content.gsub!(/include::(\S+)\.txt/) do |line|
51+
content.gsub!(/include::({build_dir}\/)?(\S+)\.txt/) do |line|
5252
line.gsub!("include::", "")
5353
if categories[line]
5454
new_content = categories[line]
@@ -240,7 +240,7 @@ def drop_uninteresting_tags(tags)
240240
end
241241

242242
def expand_content(content, path, get_f_content, generated)
243-
content.gsub(/include::(\S+)\.txt\[\]/) do |_line|
243+
content.gsub(/include::(?:{build_dir}\/)?(\S+)\.txt\[\]/) do |_line|
244244
if File.dirname(path) == "."
245245
new_fname = "#{$1}.txt"
246246
else

0 commit comments

Comments
 (0)