<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Date: Tue, 12 Jan 2010 09:05:55 +0100<br>
From: Allan Odgaard <<a href="mailto:mailinglist@textmate.org">mailinglist@textmate.org</a>><br>
Subject: [TxMt] Re: LaTeX bundle; reference/citation completion bug +<br>
suggested fix<br><br>
On 11 Jan 2010, at 09:55, Andrew Hill wrote:<br> > it seems to be the character %0A<br>
<br>
0x0A is not shown as a diamond with show invisibles.<br>
<br>
Try instead to select the diamond in TextMate and press ??X to<br>
convert it to hexadecimal.<br><br></blockquote><div><br></div><div>Right you are!</div><div>My apologies and thanks for teaching me a new trick. I also just discovered if I open up the "Edit -> Special Characters..." menu item, I can drag and drop the character into the window there to see what it is.</div>
<div><br></div><div>Anyway, it's the 0x0D character (carriage return) — I suspect my browser or the clip-board decided to clean up the line endings of the copied/pasted text by converting CR to LF before...</div><div>
<br></div><div>So it's picking up the CR char because my .tex file has CRLF line endings, and I guess the ruby script is finding ends of lines by LF character only.</div><div>To test this, I converted the document to LF line endings and the original ruby script worked fine (as did the one with the .strip addition).</div>
<div>With the CRLF line endings, the .strip (or better yet a removal of just trailing CR) is required. Alternatively, can ruby deal with CRLF line endings on its own?</div><div><br></div><div>For completeness I tried saving my document with CR line endings, and the error message was basically a re-paste of my entire document as the filename (i.e. Ruby is not parsing the CR chars as line endings, only LFs). Though I doubt anyone really uses CR line endings...</div>
<div><br></div><div>Andrew</div></div>