From 88c9757048532826e6763ffcdeb5aa6bd40d6f7d Mon Sep 17 00:00:00 2001 From: BinuDR <36463075+BinuDR@users.noreply.github.com> Date: Sun, 3 Dec 2023 19:44:45 -0600 Subject: [PATCH] register.lic - Add compatibility for column formatted output Added compatibility with the column formatted output given with TOGGLE CRAFT. It will now work properly with that setting. --- register.lic | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/register.lic b/register.lic index c5197f7865..6f1cd57838 100644 --- a/register.lic +++ b/register.lic @@ -147,10 +147,10 @@ class Register end def find_unlabeled - results = search('^\s{4}.*[A-z]+$') + results = search('^\s*.*([A-z]+|\|\s+\|)$') pages = Array.new results.each do |line| - if line =~ /^\s+(\d+)/ + if line =~ /^\|?\s+(\d+)/ pages.push(Regexp.last_match(1).to_i) end end @@ -185,6 +185,7 @@ class Register loop do line = get contents.push(line) if line =~ /\W?#{query}\W?/i + break if line.match('Currently Stored: ') break if line.match('Maximum: ') end return contents