Diff
diff --git a/cstyle/plugins/inline/main.go b/cstyle/plugins/inline/main.go
index eff0952..eb60d48 100644
--- a/cstyle/plugins/inline/main.go
+++ b/cstyle/plugins/inline/main.go
@@ -3,0 +4 @@ import (
+ "fmt"
@@ -17,0 +19 @@ func Init() cstyle.Plugin {
+ fmt.Println("start: ", n.InnerText)
@@ -18,0 +21 @@ func Init() cstyle.Plugin {
+ baseY := s[n.Parent.Children[0].Properties.Id].Y
@@ -23 +26,3 @@ func Init() cstyle.Plugin {
- if self.X+xCollect+copyOfX+self.Width-2 > parent.Width+copyOfX && i > 0 {
+ fmt.Println(23)
+ if self.X+self.Width-2 > parent.Width+copyOfX && i > 0 {
+ fmt.Println(25)
@@ -26,4 +31,14 @@ func Init() cstyle.Plugin {
- self.X = copyOfX
- xCollect = copyOfX
- } else if i > 0 {
- self.X += xCollect
+ self.X = copyOfX + self.Width
+ }
+ if i > 0 {
+ fmt.Println(31)
+ if n.Parent.Children[i-1].Style["display"] == "inline" {
+ fmt.Println(33)
+ sibling := s[n.Parent.Children[i-1].Properties.Id]
+
+ if sibling.Text.X+self.Text.Width < int(sibling.Width) {
+ fmt.Println(37)
+ self.Y -= float32(sibling.Text.LineHeight)
+ self.X += float32(sibling.Text.X)
+ }
+ }
@@ -32,2 +47,4 @@ func Init() cstyle.Plugin {
- } else if vState.X+xCollect+vState.Width-2 > parent.Width+copyOfX && i > 0 {
- xCollect = copyOfX + xCollect
+ } else if v.Style["display"] == "inline" {
+ fmt.Println(45)
+ self.X += xCollect + vState.Width
+ self.Y = baseY
@@ -35 +52,2 @@ func Init() cstyle.Plugin {
- xCollect += vState.Width
+ fmt.Println(49)
+ self.X = copyOfX