From 03bec6404f788b9a554037e5013b5e00df63e10e Mon Sep 17 00:00:00 2001 From: Martin Stajnko Date: Tue, 25 Aug 2026 21:23:49 +0200 Subject: [PATCH] docs: tighten example and merge input-handling decisions Drop the verbatim config.txt and input.txt listings from the example; both files are in the repository root. Merge the whitespace and line terminator notes into a single input-handling decision. --- README.md | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 45689ef..a1a4992 100644 --- a/README.md +++ b/README.md @@ -17,24 +17,7 @@ python main.py ### Example -With the provided `config.txt`: - -``` -a=z -bb=y -c=x -``` - -and `input.txt`: - -``` -jgrebbk6hnae -cnhjrfyjvth3nxr -b#sjcf_ansbbbbbvo! -dajf#aemfaocfna% -``` - -running: +With the provided `config.txt` and `input.txt`, running: ```bash python main.py config.txt input.txt @@ -77,12 +60,10 @@ lines but also to output the resulting text. Dropping lines that happened to match nothing would silently lose content, so every line is printed and lines with zero replacements simply sort last. -**Whitespace inside configuration values is significant.** The format has no -quoting or escaping, so a trailing space in `a=z ` is kept as part of the -replacement value; stripping it would make such a value impossible to express. - -**Only the line terminator is stripped.** Both `\n` and `\r\n` are handled, and -every other character of the line is preserved and eligible for replacement. +**Input is preserved apart from the line terminator.** Both `\n` and `\r\n` are +stripped; every other character is kept and eligible for replacement. The +configuration format has no quoting either, so whitespace inside a value is +significant — the trailing space in `a=z ` is part of the replacement value. ## Error handling