diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-21 21:20:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-21 21:20:37 +0000 |
commit | 84b5e6586f4b098d4f93a04ecc3dbfaa183f9836 (patch) | |
tree | 9fd8933da4deac90c14a3a7aaf959d7a6ac15c18 /Master/texmf-dist/scripts/latexindent/LatexIndent/Sentence.pm | |
parent | cffdb1fe27f760b0db26ceb41316473593e4851e (diff) |
latexindent (21mar20)
git-svn-id: svn://tug.org/texlive/trunk@54454 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent/Sentence.pm')
-rw-r--r-- | Master/texmf-dist/scripts/latexindent/LatexIndent/Sentence.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Sentence.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Sentence.pm index cc11997e36f..c8534681f0a 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Sentence.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Sentence.pm @@ -25,7 +25,6 @@ use LatexIndent::Environment qw/$environmentBasicRegExp/; use LatexIndent::IfElseFi qw/$ifElseFiBasicRegExp/; use LatexIndent::Heading qw/$allHeadingsRegexp/; use LatexIndent::Special qw/$specialBeginAndBracesBracketsBasicRegExp/; -use Data::Dumper; use Exporter qw/import/; our @ISA = "LatexIndent::Document"; # class inheritance, Programming Perl, pg 321 our @EXPORT_OK = qw/one_sentence_per_line/; @@ -253,7 +252,15 @@ sub one_sentence_per_line{ # text wrapping $sentenceObj->yaml_get_columns; - $sentenceObj->text_wrap; + if(${$sentenceObj}{columns}<=0){ + $logger->warn("*Sentence text wrap warning:"); + $logger->info("You have specified oneSentencePerLine:textWrapSentences, but columns is set to 0"); + $logger->info("You might wish to specify, for example: modifyLineBreaks: textWrapOptions: columns: 80"); + $logger->info("The value of oneSentencePerLine:textWrapSentences will now be set to 0, so you won't see this message again"); + ${$masterSettings{modifyLineBreaks}{oneSentencePerLine}}{textWrapSentences} = 0; + } else { + $sentenceObj->text_wrap; + } # indentation of sentences if(${$sentenceObj}{body} =~ m/ |