diff --git a/docs/whats_new.rst b/docs/whats_new.rst index 0133f1c9..fb6d5bf7 100644 --- a/docs/whats_new.rst +++ b/docs/whats_new.rst @@ -1,5 +1,30 @@ What's New ========== +v3.5.2 (2022/08/15) +------------------- + +New Features +~~~~~~~~~~~~ + +Breaking changes +~~~~~~~~~~~~~~~~ + +Deprecations +~~~~~~~~~~~~ + +Bug fixes +~~~~~~~~~ +- Make sketch's _font_size_ optional. + +Documentation +~~~~~~~~~~~~~ + +Performance +~~~~~~~~~~~ + +Internal Changes +~~~~~~~~~~~~~~~~ + v3.5.1 (2022/08/11) ------------------- diff --git a/pysd/_version.py b/pysd/_version.py index 0c11babd..dae42b1b 100644 --- a/pysd/_version.py +++ b/pysd/_version.py @@ -1 +1 @@ -__version__ = "3.5.1" +__version__ = "3.5.2" diff --git a/pysd/translators/vensim/parsing_grammars/sketch.peg b/pysd/translators/vensim/parsing_grammars/sketch.peg index b4dd0546..14f69e2d 100644 --- a/pysd/translators/vensim/parsing_grammars/sketch.peg +++ b/pysd/translators/vensim/parsing_grammars/sketch.peg @@ -34,7 +34,7 @@ flow_arrow = flow_arrow_code "," anything other_objects = other_objects_code "," anything # fonts -font_properties = font_name? "|" font_size "|" font_style? "|" color +font_properties = font_name? "|" font_size? "|" font_style? "|" color font_style = "B" / "I" / "U" / "S" / "V" # italics, bold, underline, etc font_size = ~r"\d+" # this needs to be made a regex to match any font font_name = ~r"(?<=,)[^\|\d]+(?=\|)" diff --git a/tests/more-tests/split_model_vensim_8_2_1/test_split_model_vensim_8_2_1.mdl b/tests/more-tests/split_model_vensim_8_2_1/test_split_model_vensim_8_2_1.mdl index d645c2d6..97900d12 100644 --- a/tests/more-tests/split_model_vensim_8_2_1/test_split_model_vensim_8_2_1.mdl +++ b/tests/more-tests/split_model_vensim_8_2_1/test_split_model_vensim_8_2_1.mdl @@ -92,7 +92,7 @@ $192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|255-255-255|72,7 1,4,5,1,100,0,0,22,0,0,0,-1--1--1,,1|(480,284)| 11,5,0,545,284,5,8,34,3,0,0,1,0,0,0,0,0,0,0,0,0 10,6,Heating,545,296,19,8,40,3,0,0,-1,0,0,0,0,0,0,0,0,0 -10,7,Room Temperature,532,407,35,16,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|0||128-128-128,0,0,0,0,0,0 +10,7,Room Temperature,532,407,35,16,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|||128-128-128,0,0,0,0,0,0 1,8,7,6,1,0,0,0,0,64,0,-1--1--1,,1|(608,364)| 10,9,Characteristic Time,544,188,35,17,8,130,0,3,-1,0,0,0,128-128-128,0-0-0,|0||128-128-128,0,0,0,0,0,0 1,10,9,6,1,0,0,0,0,64,0,-1--1--1,,1|(593,241)|