From 27d04253f28d759308e7f43faf9a20c168a1b97e Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Thu, 3 Oct 2024 19:04:14 +0200 Subject: [PATCH] Rename method --- lib/generator/formatter.rb | 2 +- lib/generator/operation.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/generator/formatter.rb b/lib/generator/formatter.rb index ef238b16..bd7cc1a4 100644 --- a/lib/generator/formatter.rb +++ b/lib/generator/formatter.rb @@ -54,7 +54,7 @@ def convert_doc_links_to_full_url(text) end end - def convert_http_links_to_yard(text) + def convert_html_links_to_yard(text) text.gsub(%r{([^<]+)}) do url = Regexp.last_match(1) link_text = Regexp.last_match(2) diff --git a/lib/generator/operation.rb b/lib/generator/operation.rb index 2bb3268b..2781b93f 100644 --- a/lib/generator/operation.rb +++ b/lib/generator/operation.rb @@ -33,7 +33,7 @@ def description lines.reject! { |line| line.strip == "" } description = lines.join("\n").strip - description = convert_http_links_to_yard(description) + description = convert_html_links_to_yard(description) description = convert_doc_links_to_full_url(description) split_long_comment_line(description, 6) @@ -61,7 +61,7 @@ def tags output << "@return [Hash] The API response" output.map do |line| - line = convert_http_links_to_yard(line) + line = convert_html_links_to_yard(line) line = convert_doc_links_to_full_url(line) split_long_comment_line(line, 6, 2) end