Skip to content

Commit 52fffd8

Browse files
author
prosac
committed
fixes formatted value setting after change
1 parent 0551b95 commit 52fffd8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/rspec_api_documentation/curl.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ def format_header(header)
6969
end
7070

7171
def format_full_header(header, value)
72-
formatted_value = value ? value.gsub(/"/, "\\\"") : '' unless value.is_a?(Numeric)
72+
formatted_value = if value.is_a?(Numeric)
73+
value
74+
else
75+
value ? value.gsub(/"/, "\\\"") : ''
76+
end
77+
7378
"#{format_header(header)}: #{formatted_value}"
7479
end
7580

0 commit comments

Comments
 (0)