Skip to content

Commit d165db0

Browse files
author
Vic-Nas
committed
Auto-generate docs and bump version to 0.26 [skip ci]
1 parent 2e14cbf commit d165db0

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.25
1+
0.26

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="vicutils",
9-
version="0.25",
9+
version="0.26",
1010
packages=find_packages(),
1111
install_requires=[],
1212

vicutils/printBin.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,19 @@ <h2 id="returns">Returns</h2>
199199

200200
# Special handling for child positions if unitSize &gt; 1
201201
if unitSize &gt; 1 and connectors is not None:
202-
# Left child: fill chars positioned to the right of where / appears
203-
# The connector / is centered, so it appears at position unitSize // 2
204-
# We want fill chars after it
205-
leftFill = &#34; &#34; * (unitSize // 2 + 1) + connectorFillChar * (unitSize - unitSize // 2 - 1)
202+
# Find where the connector characters appear when centered
203+
leftConnectorCentered = center(connectors[0], unitSize=unitSize, fillChar=&#34; &#34;)
204+
rightConnectorCentered = center(connectors[1], unitSize=unitSize, fillChar=&#34; &#34;)
205+
206+
leftConnectorPos = leftConnectorCentered.index(connectors[0])
207+
rightConnectorPos = rightConnectorCentered.index(connectors[1])
208+
209+
# Left child: spaces up to and including connector position, then fill chars
210+
leftFill = &#34; &#34; * (leftConnectorPos + 1) + connectorFillChar * (unitSize - leftConnectorPos - 1)
206211
mat[level][leftChildCol] = leftFill
207212

208-
# Right child: fill chars positioned to the left of where \ appears
209-
# The connector \ is centered, so it appears at position unitSize // 2
210-
# We want fill chars before it
211-
rightFill = connectorFillChar * (unitSize // 2) + &#34; &#34; * (unitSize - unitSize // 2)
213+
# Right child: fill chars up to connector position, then spaces
214+
rightFill = connectorFillChar * rightConnectorPos + &#34; &#34; * (unitSize - rightConnectorPos)
212215
mat[level][rightChildCol] = rightFill
213216

214217
prevValueIndexes = valueIndexes

0 commit comments

Comments
 (0)