Diff
diff --git a/docs/cstyle/plugins/inline/index.html b/docs/cstyle/plugins/inline/index.html
index 6dd1822..0f9ff6a 100644
--- a/docs/cstyle/plugins/inline/index.html
+++ b/docs/cstyle/plugins/inline/index.html
@@ -47,2 +47,2 @@
-21 xCollect := float32(0)
-22 // !ISSUE: Text doesn't break word
+21 xCollect := copyOfX
+22 // !ISSUE: Look at the if statements to see if they are properly selecting the correct elements
@@ -51,61 +51,72 @@
-25 if v.Style["display"] != "inline" {
-26 xCollect = 0
-27 } else {
-28 if v.Properties.Id == n.Properties.Id {
-29 // then if the x coordinate of the current element plus the x shift from its prevous siblings and the width minus 2 pixels
-30 // is greater than the width of the parent plus it's x value
-31 // and it is not the first element
-32 if self.X+xCollect+self.Width > parent.Width+parent.X && i > 0 {
-33 // We need to shift the element
-34 // then find the prevous sibling and add its height to the Y value to shift it downwards
-35 // shift the element to the base x (which should be the parent x value) and reset the xCollect
-36 fmt.Println(n.Properties.Id, "broke", xCollect, self.X, self.Width, parent.Width, parent.X)
-37 sibling := s[n.Parent.Children[i-1].Properties.Id]
-38 self.Y += sibling.Height
-39 self.X = copyOfX
-40 } else if i > 0 {
-41 fmt.Println(n.Properties.Id, n.InnerText, "did not break", xCollect, self.X, self.Width, parent.Width)
-42 self.X += xCollect
-43 sibling := s[n.Parent.Children[i-1].Properties.Id]
-44 if sibling.Height != self.Height {
-45 self.Y += sibling.Height / 4
-46 }
-47 }
-48 break
-49 } else {
-50 if n.Parent.Children[i].Style["display"] == "inline" {
-51 if colliderDetection(vState, self) {
-52 xCollect += vState.Width
-53 } else {
-54 xCollect = 0
-55 }
-56 }
-57 }
-58 }
-59 }
-60 propagateOffsets(n, copyOfX, copyOfY, self, state)
-61 (*state)[n.Properties.Id] = self
-62 },
-63 }
-64}
-65
-66func propagateOffsets(n *element.Node, copyOfX, copyOfY float32, self element.State, state *map[string]element.State) {
-67 s := *state
-68 for _, v := range n.Children {
-69 vState := s[v.Properties.Id]
-70 vState.X += self.X - copyOfX
-71 vState.Y += self.Y - copyOfY
-72 if len(v.Children) > 0 {
-73 propagateOffsets(&v, copyOfX, copyOfY, self, state)
-74 }
-75 (*state)[v.Properties.Id] = vState
-76 }
-77}
-78
-79func colliderDetection(s1, s2 element.State) bool {
-80 s1Min := s1.Y
-81 s1Max := s1.Y + s1.Height
-82 s2Min := s2.Y
-83 s2Max := s2.Y + s2.Height
-84 return s1Min > s2Min && s1Min < s2Max || s1Max > s2Min && s1Min < s2Max || s2Min > s1Min && s2Min < s1Max || s2Max > s1Min && s2Min < s1Max
-85}
+25 // if the element is the element being calculated currently
+26 if v.Style["display"] != "inline" {
+27 xCollect = 0
+28 } else {
+29 if v.Properties.Id == n.Properties.Id {
+30 // then if the x coordinate of the current element plus the x shift from its prevous siblings and the width minus 2 pixels
+31 // is greater than the width of the parent plus it's x value
+32 // and it is not the first element
+33 if self.X+xCollect+self.Width > parent.Width+parent.X && i > 0 {
+34 // We need to shift the element
+35 // then find the prevous sibling and add its height to the Y value to shift it downwards
+36 // shift the element to the base x (which should be the parent x value) and reset the xCollect
+37 fmt.Println(n.Properties.Id, "broke", xCollect, self.X, self.Width, parent.Width, parent.X)
+38 sibling := s[n.Parent.Children[i-1].Properties.Id]
+39 self.Y += sibling.Height
+40 self.X = copyOfX
+41 xCollect = copyOfX
+42 } else if i > 0 {
+43 fmt.Println(n.Properties.Id, n.InnerText, "did not break", xCollect, self.X, self.Width, parent.Width)
+44 self.X += xCollect
+45 fmt.Println(self.X)
+46 }
+47 break
+48 } else if vState.X+vState.Width > parent.Width+copyOfX && i > 0 {
+49 xCollect = copyOfX
+50 } else {
+51 xCollect += vState.Width + vState.X
+52 if vState.X+vState.Width+xCollect > parent.Width+parent.X {
+53 // If the elements are on the same line add the width of the elemenet
+54 if i > 0 {
+55 sibling := s[n.Parent.Children[i-1].Properties.Id]
+56 // !ISSUE: Commenting this out my help but can't decide
+57 if n.Parent.Children[i-1].Style["display"] != "inline" {
+58 self.Y += sibling.Height
+59 }
+60 }
+61 // !ISSUE: when not added and just set equal it shift one that collides but when added it breaks the line everytime
+62 if colliderDetection(vState, self) {
+63 xCollect += vState.Width
+64 } else {
+65 xCollect = 0
+66 }
+67 }
+68 }
+69 }
+70 }
+71 propagateOffsets(n, copyOfX, copyOfY, self, state)
+72 (*state)[n.Properties.Id] = self
+73 },
+74 }
+75}
+76
+77func propagateOffsets(n *element.Node, copyOfX, copyOfY float32, self element.State, state *map[string]element.State) {
+78 s := *state
+79 for _, v := range n.Children {
+80 vState := s[v.Properties.Id]
+81 vState.X += self.X - copyOfX
+82 vState.Y += self.Y - copyOfY
+83 if len(v.Children) > 0 {
+84 propagateOffsets(&v, copyOfX, copyOfY, self, state)
+85 }
+86 (*state)[v.Properties.Id] = vState
+87 }
+88}
+89
+90func colliderDetection(s1, s2 element.State) bool {
+91 s1Min := s1.Y
+92 s1Max := s1.Y + s1.Height
+93 s2Min := s2.Y
+94 s2Max := s2.Y + s2.Height
+95 return s1Min > s2Min && s1Min < s2Max || s1Max > s2Min && s1Min < s2Max || s2Min > s1Min && s2Min < s1Max || s2Max > s1Min && s2Min < s1Max
+96}