@@ -197,14 +197,14 @@ with respect to:
197197
198198==== Row Separator
199199
200- RFC 4180 specifies the row separator CRLF (Ruby "\r\n").
200+ RFC 4180 specifies the row separator CRLF (Ruby <tt> "\r\n"</tt> ).
201201
202- Although the \CSV default row separator is "\n",
203- the parser also by default handles row seperator "\r" and the RFC-compliant "\r\n".
202+ Although the \CSV default row separator is <tt> "\n"</tt> ,
203+ the parser also by default handles row separator <tt> "\r"</tt> and the RFC-compliant <tt> "\r\n"</tt> .
204204
205205===== Recipe: Handle Compliant Row Separator
206206
207- For strict compliance, use option +:row_sep+ to specify row separator "\r\n",
207+ For strict compliance, use option +:row_sep+ to specify row separator <tt> "\r\n"</tt> ,
208208which allows the compliant row separator:
209209 source = "foo,1\r\nbar,1\r\nbaz,2\r\n"
210210 CSV.parse(source, row_sep: "\r\n") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
@@ -219,13 +219,13 @@ But rejects other row separators:
219219===== Recipe: Handle Non-Compliant Row Separator
220220
221221For data with non-compliant row separators, use option +:row_sep+.
222- This example source uses semicolon (';' ) as its row separator:
222+ This example source uses semicolon (<tt>";"</tt> ) as its row separator:
223223 source = "foo,1;bar,1;baz,2;"
224224 CSV.parse(source, row_sep: ';') # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
225225
226226==== Column Separator
227227
228- RFC 4180 specifies column separator COMMA (Ruby ',' ).
228+ RFC 4180 specifies column separator COMMA (Ruby <tt>","</tt> ).
229229
230230===== Recipe: Handle Compliant Column Separator
231231
@@ -237,25 +237,25 @@ you need not specify option +:col_sep+ for compliant data:
237237===== Recipe: Handle Non-Compliant Column Separator
238238
239239For data with non-compliant column separators, use option +:col_sep+.
240- This example source uses TAB ("\t") as its column separator:
240+ This example source uses TAB (<tt> "\t"</tt> ) as its column separator:
241241 source = "foo,1\tbar,1\tbaz,2"
242242 CSV.parse(source, col_sep: "\t") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
243243
244244==== Quote Character
245245
246- RFC 4180 specifies quote character DQUOTE (Ruby '"' ).
246+ RFC 4180 specifies quote character DQUOTE (Ruby <tt>"\""</tt> ).
247247
248248===== Recipe: Handle Compliant Quote Character
249249
250- Because the \CSV default quote character is '"' ,
250+ Because the \CSV default quote character is <tt>"\""</tt> ,
251251you need not specify option +:quote_char+ for compliant data:
252252 source = "\"foo\",\"1\"\n\"bar\",\"1\"\n\"baz\",\"2\"\n"
253253 CSV.parse(source) # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
254254
255255===== Recipe: Handle Non-Compliant Quote Character
256256
257257For data with non-compliant quote characters, use option +:quote_char+.
258- This example source uses SQUOTE ("'") as its quote character:
258+ This example source uses SQUOTE (<tt> "'"</tt> ) as its quote character:
259259 source = "'foo','1'\n'bar','1'\n'baz','2'\n"
260260 CSV.parse(source, quote_char: "'") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
261261
0 commit comments