#164 Fix article cutoffs (after X paragraphs)

Good to go


On Mon, Sep 1, 2014 at 7:58 AM, Brian <notifications@github.com> wrote:

> In include/service/entities/article_service.js:
>
> > +					if(i === contentSettings.auto_break_articles -1 && i != tempLayoutArray.length - 1) {
> > +						newLayout += tempLayoutArray[i] + '&nbsp;<a href="' + pb.config.siteRoot + '/article/' + article.url + '">' + contentSettings.read_more_text + '...</a>' + breakString;
> > +						continue;
> > +					}
> > +					newLayout += tempLayoutArray[i] + breakString;
> > +				}
> > +
> > +				if(breakString === '</div>') {
> > +					breakString = '<div><br /></div>';
> > +				}
> > +
> > +				newLayout = newLayout.split('^dbl_pgf_break^').join(breakString);
> > +
> > +				article.article_layout = newLayout;
> > +			}
> > +		}
>
> Got it. Can you add that as in line comments for each condition?
> … <#1483114524a8ba7f_>
> On Sep 1, 2014 7:53 AM, "Blake Callens" <notifications@github.com> wrote:
> In include/service/entities/article_service.js: > + if(i ===
> contentSettings.auto_break_articles -1 && i != tempLayoutArray.length - 1)
> { > + newLayout += tempLayoutArray[i] + '&nbsp;<a href="' +
> pb.config.siteRoot + '/article/' + article.url + '">' +
> contentSettings.read_more_text + '...</a>' + breakString; > + continue; > +
> } > + newLayout += tempLayoutArray[i] + breakString; > + } > + > +
> if(breakString === '</div>') { > + breakString = '<div><br /></div>'; > + }
> > + > + newLayout = newLayout.split('^dbl_pgf_break^').join(breakString); >
> + > + article.article_layout = newLayout; > + } > + } Chrome uses divs and
> Firefox uses breaks in content editable divs. Depending on what comes up in
> a text search, we'll use that as a basis for paragraphs. We then ignore
> empty "double space" paragraphs in our count. — Reply to this email
> directly or view it on GitHub <
> https://github.com/pencilblue/pencilblue/pull/197/files#r16951008>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pencilblue/pencilblue/pull/197/files#r16951136>.
>