]> Repositorios git - scryer-prolog.git/commit
prevent accidental amalgamation of graphic token chars in output
authorMarkus Triska <[email protected]>
Tue, 17 Dec 2024 18:51:11 +0000 (19:51 +0100)
committerMarkus Triska <[email protected]>
Tue, 17 Dec 2024 19:06:52 +0000 (20:06 +0100)
commit6175e334a5785f739ff0378d3251f83d97fd7992
treeb6618c54923b74fcbcf2f355186052c44a382f1f
parent7e22c12a8d4d85f5ff72bcf6a7e2ce738bb78a40
prevent accidental amalgamation of graphic token chars in output

This addresses #2713. Many thanks to @notoria for reporting this
excellent case!

Example:

    ?- portray_clause(A = @).
    A= @ .
       true.

At other positions the now inserted space is unnecessary, as in:

    ?- portray_clause((head:- @,b)).
    head :-
       @ ,
       b.
       true.

The toplevel has a similar issue:

    ?- C = # ; false.
       C = # |<-- cursor is here; redundant space after #

There may be a way to solve this issue for all cases like this.
src/lib/format.pl