Skip to content

Commit

Permalink
Remove extra backslashes from code snippets (#3139)
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp authored Nov 5, 2024
1 parent be5265a commit e3b9478
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def to_str
option_tags(operation, api),
return_tag(operation, api),
pagination(pager, operation, api),
generated_examples(operation, api),
eventstream_examples(module_name, method_name, operation, api),
shared_examples(examples, operation, api),
given_examples(client_examples),
Expand Down Expand Up @@ -203,15 +202,11 @@ def shared_examples(examples, operation, api)
end
example_block.join("\n")
rescue
puts "Invalid example for operation: #{@name}"
puts "Invalid example for operation: #{@module_name} - #{@name}"
nil
end
end

def generated_examples(operation, api)
nil
end

def eventstream_examples(module_name, method_name, operation, api)
return unless !!Helper.eventstream_output?(operation, api)
EventStreamExample.new(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def block_comment(text, options = {})
text.lines.map do |line|
line = line.rstrip
if line == ''
"#"
'#'
else
"##{gap}#{line}"
end
Expand Down Expand Up @@ -118,10 +118,6 @@ def html_to_markdown(html, options = {})
if html
html = "<p>#{html}</p>" unless html.match(/<\w+>/)

# unescaped curly braces cause YARD errors, they are interpreted
# as code links.
html = html.gsub('{', "\\{").gsub('}', "\\}")

# Kramdown generates invalid markup when there are attributes
# on the code tag, have to reduce these down to get the proper markdown.
html = html.gsub(/<code.*?>(.+?)<\/code>/) { "<code>#{$1}</code>" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def build_keyword_arguments(plugins)
grouped = buffer.group_by { |name, _| name }
grouped.transform_values(&:count).find_all { |_, c| 1 < c }.each do |name,|
case name
when :endpoint, :endpoint_provider, :retry_limit, :disable_s3_express_session_auth, :account_id_endpoint_mode
when :endpoint, :endpoint_provider, :retry_limit, :disable_s3_express_session_auth, :account_id, :account_id_endpoint_mode
# ok
else
warn("Duplicate client option in #{@service_name}: `#{grouped[name].map { |g| g.values_at(0, 2) }}`", uplevel: 0)
Expand Down
2 changes: 0 additions & 2 deletions gems/aws-sigv4/lib/aws-sigv4/asymmetric_credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ module AsymmetricCredentials

N_MINUS_2 = 0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551 - 2

# @param [String] :access_key_id
# @param [String] :secret_access_key
# @return [OpenSSL::PKey::EC, Hash]
def self.derive_asymmetric_key(access_key_id, secret_access_key)
check_openssl_support!
Expand Down

0 comments on commit e3b9478

Please sign in to comment.