summaryrefslogtreecommitdiff
path: root/support/latexindent/LatexIndent/GetYamlSettings.pm
diff options
context:
space:
mode:
Diffstat (limited to 'support/latexindent/LatexIndent/GetYamlSettings.pm')
-rw-r--r--support/latexindent/LatexIndent/GetYamlSettings.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/support/latexindent/LatexIndent/GetYamlSettings.pm b/support/latexindent/LatexIndent/GetYamlSettings.pm
index f28fdd6525..1529493d4f 100644
--- a/support/latexindent/LatexIndent/GetYamlSettings.pm
+++ b/support/latexindent/LatexIndent/GetYamlSettings.pm
@@ -570,6 +570,27 @@ sub yaml_read_settings{
$logger->info(Dumper(\%masterSettings));
}
+ if( $is_m_switch_active
+ and ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{beforeFindingChildCodeBlocks}
+ and !${$masterSettings{modifyLineBreaks}{textWrapOptions}}{perCodeBlockBasis} ){
+
+ # the following settings don't make sense, so we change
+ #
+ # modifyLineBreaks:
+ # textWrapOptions:
+ # perCodeBlockBasis: 0
+ # beforeFindingChildCodeBlocks: 1
+ # into
+ #
+ # modifyLineBreaks:
+ # textWrapOptions:
+ # perCodeBlockBasis: 0
+ # beforeFindingChildCodeBlocks: 0
+ $logger->warn("*textWrapOptions:beforeFindingChildCodeBlocks:1 with textWrapOptions:perCodeBlockBasis:0");
+ $logger->warn("turning off beforeFindingChildCodeBlocks by changing textWrapOptions:beforeFindingOtherCodeBlocks to be 0");
+ $logger->warn("you need to set *both* values to be 1 to use the beforeFindingChildCodeBlocks feature");
+ ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{beforeFindingChildCodeBlocks} = 0;
+ }
return;
}