Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing space in portray_clause/2 #2713

Open
notoria opened this issue Dec 17, 2024 · 0 comments
Open

Missing space in portray_clause/2 #2713

notoria opened this issue Dec 17, 2024 · 0 comments

Comments

@notoria
Copy link
Contributor

notoria commented Dec 17, 2024

I tried this:

?- portray_clause(user_output, X= @).
A= @.
   true.
?-

Expected: A= @ .

triska added a commit to triska/scryer-prolog that referenced this issue Dec 17, 2024
…raphic chars

This addresses mthom#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.
triska added a commit to triska/scryer-prolog that referenced this issue Dec 17, 2024
This addresses mthom#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant