pedro-w commented on PR #257:
URL: https://github.com/apache/commons-csv/pull/257#issuecomment-1240838646

   > 
   
   
   > Is the intent to allow comments at the start and end of a file or before 
and after each record?
   
   The former. I'll explain my thinking, *please correct me if I've got it 
wrong!*
   
       ; Comment 0
       A,B
       ; Comment 1
       1,1
       ; Comment 2
       2,2
       ; Comment 3
   
   The comments attach to the following line so Comments 1 & 2 can currently be 
extracted from the corresponding `CSVRecord`s and Comment 3 can never be 
accessed. Comment 0 is a special case. If we ask `CSVParser` to generate the 
column headings from the first record, it can't be accessed, but otherwise it's 
attached to "A,B" which is just a normal data record.
   
   My intention was to allow access to Comment 0 via `getHeaderComment` (only 
in the case of generated column names) and Comment 3 via `getTrailerComment` 
(always).
   
   
   I'll get onto the other issues too as they're mostly just formatting.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to