3 ms·
Sweet, thanks for this. edit: Took a look at Raganwald's combinator book sample. It has this bit of code: address = Person.find(...).tap { |p| logger.
by jamesbritt 15y ago
Sweet, thanks for this.
edit: Took a look at Raganwald's combinator book sample.
It has this bit of code:
address = Person.find(...).tap { |p| logger.log "person #{p} found" }.addre\
ss
That's absurd.
Was this an editing choice by Reg, or is this something the software does?
- spatten 15y agoThis is a special case of a preformatted code block. For preformatted code blocks, there has to be an absolute line length -- otherwise the code just flows off the right side of the page, as <pre> blocks only do line-breaks when they are actually there. So, what we do is take all pre-formatted code blocks, wrap them if they go over a certain line length and send a warning to the author letting them know that we did this. This is a case where human intervention is required -- we need to show all of the text, but most of the time you'll want to edit where the line breaks manually. Most of the time automation is good enough, but we try to inform authors when there's something that needs their attention.
- jamesbritt 15y agoThis is a case where human intervention is required -- we need to show all of the text, but most of the time you'll want to edit where the line breaks manually. OK, so an author would know that there were things that should be manually inspected and changed if needed.