Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #16334

Re: Scanning

From Noel Duffy <uaigh@icloud.com>
Newsgroups comp.programming
Subject Re: Scanning
Date 2023-01-21 11:29 +1300
Organization A noiseless patient Spider
Message-ID <tqf4jp$28cng$1@dont-email.me> (permalink)
References <Scanning-20230119123241@ram.dialup.fu-berlin.de> <scanner-20230119154238@ram.dialup.fu-berlin.de> <tqbm8u$1hm7b$1@dont-email.me> <iterations-20230119174516@ram.dialup.fu-berlin.de> <scanner-20230120125512@ram.dialup.fu-berlin.de>

Show all headers | View raw


On 21/01/23 01:16, Stefan Ram wrote:
> ram@zedat.fu-berlin.de (Stefan Ram) writes:
[..]
> 
>    The output often ends with one space, because a '\n' is
>    added to the end of the input if it's missing, and this
>    then is being converted to a space. So, ironically, while
>    I set out to strip spaces at the end of lines, I now
>    sometimes add them to the end of lines!

While I don't have any great insight to offer, I did write a small 
markup engine a few years ago (in Object Pascal). What you say above 
brought back memories of struggles I had with my code too. The 
conclusion I came to at the time is that when it comes to things like 
spacing, there are several equally valid ways to do it, and you'll 
probably want different handling for different use-cases, so it's better 
to parameterize it so that users of your code can set which handling 
they prefer. I went with making it a parameter. It's a bit more work but 
the flexibility is usually worth it in the long run.

Back to comp.programming | Previous | NextPrevious in thread | Find similar


Thread

Re: Scanning Richard Heathfield <rjh@cpax.org.uk> - 2023-01-19 15:06 +0000
  Re: Scanning Noel Duffy <uaigh@icloud.com> - 2023-01-21 11:29 +1300

csiph-web