shithub: mycel

Download patch

ref: 61a338e19d2e61337515130f2c635e5b6428a687
parent: 8f4713facefc9e53ac6ef882f38cc1173ac1a610
author: Philip Silva <philip.silva@protonmail.com>
date: Sat Mar 27 11:10:28 EDT 2021

adapt display:inline test to flattened elements

- <a>, <span> going handled uniformly through
  InnerNodesToBox(..)

--- a/browser/browser_test.go
+++ b/browser/browser_test.go
@@ -261,9 +261,12 @@
 	if bel.n.Data() != "(" {
 		t.Errorf("bel: %+v", bel)
 	}
-	if ael.n.Data() != "a" {
+	if ael.n.Data() != "span" {
 		t.Errorf("ael: %+v %+v '%v'", ael, ael.n, ael.n.Data())
 	}
+	if !ael.IsLink || ael.Click == nil {
+		t.Errorf("ael: %+v %+v '%v'", ael, ael.n, ael.n.Data())
+	}
 }
 
 func TestInlining2(t *testing.T) {
@@ -305,7 +308,10 @@
 	if sel.n.Data() != "span" {
 		t.Errorf("sel: %+v", sel)
 	}
-	if ael.n.Data() != "a" {
+	if ael.n.Data() != "edit" {
+		t.Errorf("ael: %+v %+v", ael, ael.n)
+	}
+	if !ael.IsLink || ael.Click == nil {
 		t.Errorf("ael: %+v %+v", ael, ael.n)
 	}
 }