mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-12 02:02:16 +10:00
fixes for ascii
This commit is contained in:
@@ -251,13 +251,21 @@ public class TreeAsciiUtil {
|
|||||||
|
|
||||||
// Add separator after each element except the last
|
// Add separator after each element except the last
|
||||||
if (i < elementLines.size() - 1) {
|
if (i < elementLines.size() - 1) {
|
||||||
// If all elements have the same height, always use separator (for simple test case)
|
// Only add separator on the center line
|
||||||
// Otherwise, use separator only on the center line (for original test case)
|
if (line == centerLine) {
|
||||||
if (uniformHeight || line == centerLine) {
|
// Check if the current element ends with a box character
|
||||||
sb.append(separator);
|
String currentLine = sb.toString();
|
||||||
} else {
|
if (currentLine.endsWith(BOXDL) || currentLine.endsWith(BOXUL)) {
|
||||||
sb.append(blankSeparator);
|
// If it ends with a box character, just add a single dash
|
||||||
}
|
sb.append(BOXH);
|
||||||
|
} else {
|
||||||
|
// Otherwise add normal separator
|
||||||
|
sb.append(separator);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Don't add any separator on non-center lines
|
||||||
|
sb.append(NBSP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user