phpBB3インポートスクリプトの機能強化リクエスト

難しそうですが、こちらのメソッドを変更することで成功するかもしれません。

こちらではなく、

text.gsub!(attachment_regexp) do
        index = $1.to_i
        real_filename = $2
        unreferenced_attachments[index] = nil
        attachments.fetch(index, real_filename)
end

このようなものをご希望でしょう。

text.gsub!(attachment_regexp) do
        index = $1.to_i
        description = $2.strip
        unreferenced_attachments[index] = nil

        url = attachments.fetch(index, description)

        "![#{description}](#{url})"
end

これは単に変更が必要な場所を示すための未テストの例です。間違っている可能性もあります。

もし明日時間があれば、実際の解決策とともにPR(プルリクエスト)を開くかもしれません。:grinning_face_with_smiling_eyes:

「いいね!」 5