Add trailing blank lines at the end of the page.

@param pre the content tree to which the blank lines will be added.
540420
private static void addBlankLines(Content pre) {
        for (int i = 0; i < NUM_BLANK_LINES; i++) {
            pre.addContent(NEW_LINE);
        }
    }
1186812
private function beforeClose()
    {
        if ($this->isWritable() && $this->lastLine !== '') {
            $this->stream->write("\r\n");
            $this->lastLine = '';
        }
    }
929962
function pre() {
  return function(data, render) {
    // remove first line if empty ; it happens because of
    // the {{pre}} tag on one line.
    logger.debug('empty line:', Boolean(data.match(/^\s+\n/, '')));
    data = data.replace(/^\s+\n/, '');
    // Find the first non-empty lines tabulation
    var m = data.match(/^([ \r\t]+)[^\s]/m);
    if (!m) {
      return render(data);
    }
    var prefix = m[1];
    // remove the prefix from the beginning of all lines before rendering
    data = data.replace(new RegExp('^' + prefix, 'mg'), '');
    var output = render(data);
    output = output.replace(/\n/mg, '\n' + prefix);
    // Depending what kind of content is on the first line, it might
    // or might not keep the spacing...
    // if the first does not contains the pattern, add it
    if (data.substring(0, prefix.length) !== prefix) {
      output = prefix + output;
    }
    return output;
  };
}
118229
protected void newLine() throws DocumentException {
        lastElementType = -1;
        carriageReturn();
        if (lines != null && !lines.isEmpty()) {
            lines.add(line);
            currentHeight += line.height();
        }
        line = new PdfLine(indentLeft(), indentRight(), alignment, leading);
    }
1333385
private void insertEditEmpty() throws CmsException, JspException {

        Tag ancestor = findAncestorWithClass(this, I_CmsXmlContentContainer.class);
        I_CmsXmlContentContainer container = null;
        if (ancestor != null) {
            // parent content container available, use preloaded values from this container
            container = (I_CmsXmlContentContainer)ancestor;
            insertEditEmpty(pageContext, container, m_mode == null ? CmsDirectEditMode.AUTO : m_mode, null);
        }
    }
169439
public void newLineIfNotEmpty() {
		for (int i = segments.size() - 1; i >= 0; i--) {
			String segment = segments.get(i);
			if (lineDelimiter.equals(segment)) {
				segments.subList(i + 1, segments.size()).clear();
				cachedToString = null;
				return;
			}
			for (int j = 0; j < segment.length(); j++) {
				if (!WhitespaceMatcher.isWhitespace(segment.charAt(j))) {
					newLine();
					return;
				}
			}
		}
		segments.clear();
		cachedToString = null;
	}
898945
protected void afterEndDocument() {
        depth = 0;
        final Set<StackState> state = scopeState.getFirst();
        if (state.contains(StackState.WROTE_MARKUP)
                && !state.contains(StackState.WROTE_DATA)) { // but not data
            try {
                final String indent = getLineSeparator() + StringUtils.repeat("  ", 0);
                final Characters indentEvent = xmlEventFactory.createCharacters(indent);
                wrappedWriter.add(indentEvent);
            } catch (Exception ignored) {
            }
        }
        scopeState.clear();
        scopeState.push(EnumSet.noneOf(StackState.class)); // start fresh
    }
845698
@Override
    public final synchronized void beforeCompletion()
                    throws RemoteException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "beforeCompletion: " + getStateName(state), currentTx); //123293

        if (removed) {
            if (isTraceOn && tc.isEntryEnabled())
                Tr.exit(tc, "beforeCompletion: removed");
            return;
        }

        switch (state)
        {
            case TX_METHOD_READY:
                setState(COMMITTING_OUTSIDE_METHOD);
                break;

            case TX_IN_METHOD:
                setState(COMMITTING_IN_METHOD);
                break;

            // Could happen during async rollback
            case IN_METHOD:
            case METHOD_READY:
            case DESTROYED:
                if (isTraceOn && tc.isEntryEnabled())
                    Tr.exit(tc, "beforeCompletion: asynch rollback: " + getStateName(state));
                return;

            default:
                if (isTraceOn && tc.isDebugEnabled()) // d144064
                    Tr.debug(tc, "invalid state: " + state); //123293
                throw new InvalidBeanOStateException(StateStrs[state],
                                "TX_IN_METHOD | " +
                                                "TX_METHOD_READY");

        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "beforeCompletion: " + getStateName(state));

    }
693964
public void appendLine(final Line line)
    {
        if (this.lineTail == null)
        {
            this.lines = this.lineTail = line;
        }
        else
        {
            this.lineTail.nextEmpty = line.isEmpty;
            line.prevEmpty = this.lineTail.isEmpty;
            line.previous = this.lineTail;
            this.lineTail.next = line;
            this.lineTail = line;
        }
    }
1084881
private function fixLinesBetweenUses(int $usePos, int $previousUseEndPos): void
    {
        $file = $this->getFile();

        $posBeforeIndentation = TokenHelper::findPreviousContent(
            $file,
            T_WHITESPACE,
            $file->eolChar,
            $usePos,
            $previousUseEndPos
        );

        $file->fixer->beginChangeset();
        if ($posBeforeIndentation !== null) {
            for ($i = $previousUseEndPos + 1; $i <= $posBeforeIndentation; $i++) {
                $file->fixer->replaceToken($i, '');
            }
        }
        for ($i = 0; $i <= self::LINES_BETWEEN_USES; $i++) {
            $file->fixer->addNewline($previousUseEndPos);
        }
        $file->fixer->endChangeset();
    }
1184580
public void setEndings(int i, float v) { 
    if (DocumentLine_Type.featOkTst && ((DocumentLine_Type)jcasType).casFeat_endings == null)
      jcasType.jcas.throwFeatMissing("endings", "ch.epfl.bbp.uima.types.DocumentLine");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DocumentLine_Type)jcasType).casFeatCode_endings), i);
    jcasType.ll_cas.ll_setFloatArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DocumentLine_Type)jcasType).casFeatCode_endings), i, v);}
931365
function before(element, content) {
  if (isString(content)) {
    return element.insertAdjacentHTML('beforeBegin', content);
  } else {
    return element.parentNode.insertBefore(normalizeContent(content), element);
  }
}
409292
protected void appendCopiesAfter(RoaringArray sa, short beforeStart) {
    int startLocation = sa.getIndex(beforeStart);
    if (startLocation >= 0) {
      startLocation++;
    } else {
      startLocation = -startLocation - 1;
    }
    extendArray(sa.size - startLocation);

    for (int i = startLocation; i < sa.size; ++i) {
      this.keys[this.size] = sa.keys[i];
      this.values[this.size] = sa.values[i].clone();
      this.size++;
    }
  }
163291
private void insertAfter(final URI hrefValue, final StringBuffer parentResult, final CharSequence tmpContent) {
        int insertpoint = parentResult.lastIndexOf("</");
        final int end = parentResult.indexOf(">", insertpoint);

        if (insertpoint == -1 || end == -1) {
            logger.error(MessageUtils.getMessage("DOTJ033E", hrefValue.toString()).toString());
        } else {
            if (ELEMENT_NAME_DITA.equals(parentResult.substring(insertpoint, end).trim())) {
                insertpoint = parentResult.lastIndexOf("</", insertpoint - 1);
            }
            parentResult.insert(insertpoint, tmpContent);
        }
    }
226332
public void replaceLines(int startLine, int endLine, List<String> replacementLines) {
    Preconditions.checkArgument(startLine <= endLine);
    List<String> originalLines = getLines();
    List<String> newLines = new ArrayList<>();
    for (int i = 0; i < originalLines.size(); i++) {
      int lineNum = i + 1;
      if (lineNum == startLine) {
        newLines.addAll(replacementLines);
      } else if (lineNum > startLine && lineNum <= endLine) {
        // Skip
      } else {
        newLines.add(originalLines.get(i));
      }
    }
    replaceLines(newLines);
  }
1277498
protected void addSpacing(float extraspace, float oldleading, Font f) {
    	if (extraspace == 0) return;
    	if (pageEmpty) return;
    	if (currentHeight + line.height() + leading > indentTop() - indentBottom()) return;
        leading = extraspace;
        carriageReturn();
        if (f.isUnderlined() || f.isStrikethru()) {
            f = new Font(f);
            int style = f.getStyle();
            style &= ~Font.UNDERLINE;
            style &= ~Font.STRIKETHRU;
            f.setStyle(style);
        }
        Chunk space = new Chunk(" ", f);
        space.process(this);
        carriageReturn();
        leading = oldleading;
    }
289703
private void addLastOfType() {
		for (Node node : nodes) {
			Index index = helper.getIndexInParent(node, true);
			if (index.index == (index.size-1))
				result.add(node);
		}
	}