Closed OnlineCop closed 11 months ago
So ;d
should only be used in list-mode?
Possibly, but list-mode doesn't allow Code Generator to be selected.
Right, thank you!
The code generated for SED seems to be missing comments that other languages tend to include:
# This removes non-matching lines from the result; remove ';d' if you wish to preserve non-matching lines:
or similar could be added right before it.
š for @OnlineCop. That's exactly the point ... since you can see non matching lines as they are before and after the substitution ... The generated code for SED shouldn't include that ;d
š
I'll fix this, thank you!
Bug Description
The Code Generator for SED appends
;d
which is deleting non-matching lines. Without the;d
at the end, non-matching lines are preserved.Reproduction steps
Example code, where substitution is empty to simply remove the text at the end of the lines: https://regex101.com/r/HNAF9L/1 Code Generator with SED selected: https://regex101.com/r/HNAF9L/1/codegen?language=SED
Current output:
Expected Outcome
The Code Generator should produce output which does not remove non-matching lines, or at least adds a note on how the end user can include/omit that
;d
to display/suppress those lines as needed: