From f57a964ef41e8cd7dd4bd5af6e471205008f64ef Mon Sep 17 00:00:00 2001 From: Adrien Bertrand Date: Sun, 7 Apr 2024 23:15:25 +0200 Subject: [PATCH] TH_Tokenized: makeStringFromData: pass options to reindentCodeString. --- TIVarsLib.wasm | Bin 529321 -> 530164 bytes src/TypeHandlers/TH_Tokenized.cpp | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/TIVarsLib.wasm b/TIVarsLib.wasm index a459e5590c91142ab3b6c47f318291e467e45a54..f839c73508d23ca42b6330cb9156ad0dac57e260 100755 GIT binary patch delta 5715 zcmbVQd3aPsw!f#U?(Oc}?oLBU$e!CxRv;u0AR7EI7YvIaC_&(%tfMkEvLpdz8xod) zFEJPhQYeCPHb-X^F={EOr~@+yD&X>jrw%&$z31qt8T5(cGQ3}PCm5IS{qe-yU!A4S zId$sPseAkW`<%}obRPbU<$HPw!!!&gn3oINW~L#8VF)A3!+bu=5T?gwte_)}ALg{a z?Tqy)p2t0v_IkPq|DUsVdDeHNdpS{KTefcvgu8sR6Cl}SHCh|3^=&+12AJ0-WaGIy zp$*SO`yzJusgCjXfDGE)u{{6C6l&=hx$>}=Hg<^h!~C?eqhiZrL>t;VZ=Zta=+?2c zp`*F=uEdVezS-1~*ZxtcWAP(5B(&ZCw@w7>7;5e-R6-q|XP&lTUUhnA`b7$qc7i~LtUt5RS2=?zBf)GLYPC*YY7RhZPM(o^VLuXt!W%as{9luouB zolN`zp*p7E$#CB;yz;JwWr9&>J9B^p#bn98y z7#HzoL_CftWPKdV!Ps(zgTL{bpAgE8_@Sd26C8hrOJhW()-@s`Kz`G9JPvmsrl_Me zEv@NwEE#qvRW1sXFVP2|1oaZbh*$`yF-&D-t0%)0B-@@0DFRy<_RCiyluLefE<(Q} zEUZ13suAVqxwP1}wOMk#6EJ^K9{m;kEAwfx9GyownLUI*j84e4c~p?aY#nf>OJm`U zk21=ca5$nC(c#RH^9!kLd_lQ^FkPd7p4g&ZeeRJx&1IMO92M+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Gj$}g^ z_YY&?{P$w9Y!Q2dzc3bW4(lhfR30{xjTHJM_CEy5`Hkr;RhX06CcyYVehHUn1^=&?SRW`C ziBni6L2}qs=0Wi0)ByMWsjLprFzz*Wgr6;A(fsyn%tXe+GM2~lUuVPlfobfGpvL_c zzCgYU4--CmI$MdZan!?dz>WUa0i*a;iI;O6HBBTHGffViQ4$z>NQoSpj{`i3qEG?fN;}M7HWf8yx%1jB~JX7ohC3# z+&PbtA>8{Z%S0Fy-aE^_e~M6` z#qV(S3Q8tzY?CDXNHTPDnaYGxJodvrk)C;>c;WHwh9R{_$68K7amfKxxl)91-yl(c_$YEbK=r z(+0-uto<%;VzZL5Z|xgpv?6=BCn?QaZWa;&xje`OK--_*SAFiWm1 z*4__-(fslfZCoopcWE2$t8T+D25^y7qxHA9TZ6w<>9RH3u`^kU{J7Wfd8@T`xJ|A) ztviDLby^0dQc0Z_=~U;MAtvz6yVNbb`@3oc|89%sX-yPGZhE#@xk)<=|F@z?V8T_% zq};zvE0@r_9e)mhT0VM*_OD2G+^LPqYB_Y4G-;zCDR2N;_E{CZ@%I%XPb2vaGQxul o{@{u>AZBKsk`Scxltes7T2;lUFSNHcn7QooHBDT;W=rk+zZoda&;S4c diff --git a/src/TypeHandlers/TH_Tokenized.cpp b/src/TypeHandlers/TH_Tokenized.cpp index 089ead3..ae81833 100644 --- a/src/TypeHandlers/TH_Tokenized.cpp +++ b/src/TypeHandlers/TH_Tokenized.cpp @@ -170,7 +170,12 @@ namespace tivars if (has_option(options, "reindent") && options.at("reindent") == 1) { - str = reindentCodeString(str); + options_t indent_options{}; + if (has_option(options, "indent_char")) + indent_options["indent_char"] = options.at("indent_char"); + if (has_option(options, "indent_n")) + indent_options["indent_n"] = options.at("indent_n"); + str = reindentCodeString(str, indent_options); } return str;