]> Repositorios git - scryer-prolog.git/commitdiff
check atom == ',' in ambiguity_check mirroring logic in print_op_addendum (#2000)
authorMark <[email protected]>
Tue, 5 Sep 2023 20:56:26 +0000 (14:56 -0600)
committerMark <[email protected]>
Tue, 5 Sep 2023 20:56:26 +0000 (14:56 -0600)
src/heap_print.rs

index 9880a4d1730ab70242fb35021d607a0951eb519e..1b69f86620a301042d012ffd3918d626db53216e 100644 (file)
@@ -580,7 +580,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
     fn ambiguity_check(&self, atom: &str) -> bool {
         let tail = &self.outputter.as_str()[self.last_item_idx..];
 
-        if !self.quoted || non_quoted_token(atom.chars()) {
+        if atom == "," || !self.quoted || non_quoted_token(atom.chars()) {
             requires_space(tail, atom)
         } else {
             requires_space(tail, "'")