Skip to content

Commit e3b9478

Browse files
authored
Remove extra backslashes from code snippets (#3139)
1 parent be5265a commit e3b9478

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

build_tools/aws-sdk-code-generator/lib/aws-sdk-code-generator/client_operation_documentation.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def to_str
5454
option_tags(operation, api),
5555
return_tag(operation, api),
5656
pagination(pager, operation, api),
57-
generated_examples(operation, api),
5857
eventstream_examples(module_name, method_name, operation, api),
5958
shared_examples(examples, operation, api),
6059
given_examples(client_examples),
@@ -203,15 +202,11 @@ def shared_examples(examples, operation, api)
203202
end
204203
example_block.join("\n")
205204
rescue
206-
puts "Invalid example for operation: #{@name}"
205+
puts "Invalid example for operation: #{@module_name} - #{@name}"
207206
nil
208207
end
209208
end
210209

211-
def generated_examples(operation, api)
212-
nil
213-
end
214-
215210
def eventstream_examples(module_name, method_name, operation, api)
216211
return unless !!Helper.eventstream_output?(operation, api)
217212
EventStreamExample.new(

build_tools/aws-sdk-code-generator/lib/aws-sdk-code-generator/docstring.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def block_comment(text, options = {})
2727
text.lines.map do |line|
2828
line = line.rstrip
2929
if line == ''
30-
"#"
30+
'#'
3131
else
3232
"##{gap}#{line}"
3333
end
@@ -118,10 +118,6 @@ def html_to_markdown(html, options = {})
118118
if html
119119
html = "<p>#{html}</p>" unless html.match(/<\w+>/)
120120

121-
# unescaped curly braces cause YARD errors, they are interpreted
122-
# as code links.
123-
html = html.gsub('{', "\\{").gsub('}', "\\}")
124-
125121
# Kramdown generates invalid markup when there are attributes
126122
# on the code tag, have to reduce these down to get the proper markdown.
127123
html = html.gsub(/<code.*?>(.+?)<\/code>/) { "<code>#{$1}</code>" }

build_tools/aws-sdk-code-generator/lib/aws-sdk-code-generator/views/rbs/client_class.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def build_keyword_arguments(plugins)
138138
grouped = buffer.group_by { |name, _| name }
139139
grouped.transform_values(&:count).find_all { |_, c| 1 < c }.each do |name,|
140140
case name
141-
when :endpoint, :endpoint_provider, :retry_limit, :disable_s3_express_session_auth, :account_id_endpoint_mode
141+
when :endpoint, :endpoint_provider, :retry_limit, :disable_s3_express_session_auth, :account_id, :account_id_endpoint_mode
142142
# ok
143143
else
144144
warn("Duplicate client option in #{@service_name}: `#{grouped[name].map { |g| g.values_at(0, 2) }}`", uplevel: 0)

gems/aws-sigv4/lib/aws-sigv4/asymmetric_credentials.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ module AsymmetricCredentials
1111

1212
N_MINUS_2 = 0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551 - 2
1313

14-
# @param [String] :access_key_id
15-
# @param [String] :secret_access_key
1614
# @return [OpenSSL::PKey::EC, Hash]
1715
def self.derive_asymmetric_key(access_key_id, secret_access_key)
1816
check_openssl_support!

0 commit comments

Comments
 (0)