huderlem / poryscript

High-level scripting language for gen 3 pokemon decompilation projects
https://www.huderlem.com/poryscript-playground/
MIT License
191 stars 21 forks source link

Ability to set default line lengths per font in JSON config #50

Closed Jademalo closed 1 year ago

Jademalo commented 1 year ago

Closes https://github.com/huderlem/poryscript/issues/44

Structure of JSON changed to allow for additional options per font, with maxLineLength added. Included JSON has been renamed to font_config.json since it includes more information than just the character widths, and everything else updated accordingly. Argument to select the file has also been changed to -fc to reflect this. It should also be easier to add additional values per font in the future, should they be necessary.

I think I've done this correctly, in my manual testing it works entirely as expected. I had to update the tests to correctly use the new JSON file, but after doing that they all pass.

codecov-commenter commented 1 year ago

Codecov Report

Merging #50 (6aaa7c2) into master (6f23f89) will increase coverage by 0.01%. The diff coverage is 93.33%.

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
+ Coverage   92.30%   92.32%   +0.01%     
==========================================
  Files           7        7              
  Lines        2352     2357       +5     
==========================================
+ Hits         2171     2176       +5     
  Misses        114      114              
  Partials       67       67              
Impacted Files Coverage Δ
parser/parser.go 90.64% <87.50%> (+0.03%) :arrow_up:
parser/formattext.go 93.83% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

huderlem commented 1 year ago

Thanks!