summaryrefslogtreecommitdiffstats
path: root/strudel.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-01-04 08:18:25 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-01-04 08:18:25 -0800
commitcbe8742368f10859f105414438a7848aaff933f5 (patch)
treeb3412ced1ecd97673c0a3c891d8bba23ea574d4f /strudel.h
parentbb3e57a90227e74122d80dd614993cca7d96a73e (diff)
downloadtxr-cbe8742368f10859f105414438a7848aaff933f5.tar.gz
txr-cbe8742368f10859f105414438a7848aaff933f5.tar.bz2
txr-cbe8742368f10859f105414438a7848aaff933f5.zip
lazy-str-get-trailing-list: spurious empty string issue.
* lib.c (lazy_str_get_trailing_list): Remove the spurious empty string caused by splitting on the terminator. Whenever the materialized prefix is not-empty, and there is a non-empty terminator, the prefix necessarily ends in the termintator. If we split on the terminator, the list of pieces ends in in an empty string, which is undesirable. This has to be subject to compat, unfortunately; it's a very visible behavior that affects the continuation of line-based matching after the @(freeform) directive. * tests/006/freeform-5.txr: With this fix, we no longer have to match the spurious blank line coming from @(freeform). * tests/015/lazy-str.tl: New file. * txr.1: Updated documentation with compat notes. There was some outright incorrect text describing lazy-str-get-trailing-list. Also, the lazy-str-force-upto and lazy-str-force were under-documented. The return value of the former was not completely described: that it returns t in the other case when not returning nil. It wasn't mentioned that the functions observe the limit-count. Moreover, the exact algorithm for forcing is now documented.
Diffstat (limited to 'strudel.h')
0 files changed, 0 insertions, 0 deletions