This will indent the given set of lines by normal HTML layout.
		An initial indent of `2*indent` will be used to account for the
		`<html><head>` or `<html><body>` levels.
970434
def __indent(self, lines, indent, initial=2):
		""""""
		tagempty = re.compile(r"""<\w+(\s+[^>]*?)*/>""")
		tagopen = re.compile(r"""<\w+(\s+[^>]*?)*>""")
		tagclose = re.compile(r"""</\w+\s*>""")
		prefix = indent * initial
		for i in range(len(lines)):
			line = lines[i].strip()
			if tagempty.match(line):
				line = prefix + line
			elif tagopen.match(line):
				line = prefix + line
				prefix = prefix + indent
			elif tagclose.match(line):
				prefix = prefix[:-len(indent)]
				line = prefix + line
			elif '\n' in line:
				line = [prefix + l.strip() for l in line.split('\n')]
				line = os.linesep.join(line)
			else:
				line = prefix + line
			lines[i] = line + os.linesep
16403
def indent(self, levels, first_line=None):
        """"""
        self._indentation_levels.append(levels)
        self._indent_first_line.append(first_line)
293069
def format(self, indent_level, indent_size=4):
        

        desc = self.format_name('String')
        return self.wrap_lines(desc, indent_level, indent_size=indent_size)
758691
def indent(lines, amount, ch=' '):
    """"""
    padding = amount * ch
    return padding + ('\n' + padding).join(lines.split('\n'))
723641
protected void html() {
        int p = bp;
        nextChar();
        if (isIdentifierStart(ch)) {
            String name = readIdentifier();
            checkHtmlTag(name);
            htmlAttrs();
            if (ch == '/') {
                nextChar();
            }
            if (ch == '>') {
                nextChar();
                return;
            }
        } else if (ch == '/') {
            nextChar();
            if (isIdentifierStart(ch)) {
                readIdentifier();
                skipWhitespace();
                if (ch == '>') {
                    nextChar();
                    return;
                }
            }
        } else if (ch == '!') {
            nextChar();
            if (ch == '-') {
                nextChar();
                if (ch == '-') {
                    nextChar();
                    while (bp < buflen) {
                        int dash = 0;
                        while (ch == '-') {
                            dash++;
                            nextChar();
                        }
                        // Strictly speaking, a comment should not contain "--"
                        // so dash > 2 is an error, dash == 2 implies ch == '>'
                        // See http://www.w3.org/TR/html-markup/syntax.html#syntax-comments
                        // for more details.
                        if (dash >= 2 && ch == '>') {
                            nextChar();
                            return;
                        }

                        nextChar();
                    }
                }
            }
        }

        bp = p + 1;
        ch = buf[bp];
    }
1364085
float indentLeft() {
        if (isRTL) {
            switch (alignment) {
                case Element.ALIGN_LEFT:
                    return left + width;
                case Element.ALIGN_CENTER:
                    return left + (width / 2f);
                default:
                    return left;
            }
        }
        else if (this.getSeparatorCount() == 0) {
            switch (alignment) {
                case Element.ALIGN_RIGHT:
                    return left + width;
                case Element.ALIGN_CENTER:
                    return left + (width / 2f);
            }
        }
        return left;
    }
1747
function indent(string, nchars, prefix) {
    "use strict";
    return string.split('\n').map(function(line) {
        return (prefix || '') + new Array(nchars).join(' ') + line;
    }).join('\n');
}
137699
def write_indented_block(self, block):
        """"""
        self.in_indent_lines = False
        for l in re.split(r'\r?\n', block):
            self.line_buffer.append(l)
            self._update_lineno(1)
374228
public void normalizeIndentation() {
        float max = 0;
    	Element o;
        for (Iterator i = list.iterator(); i.hasNext(); ) {
        	o = (Element)i.next();
            if (o instanceof ListItem) {
            	max = Math.max(max, ((ListItem)o).getIndentationLeft());
            }
        }
        for (Iterator i = list.iterator(); i.hasNext(); ) {
        	o = (Element)i.next();
            if (o instanceof ListItem) {
            	((ListItem)o).setIndentationLeft(max);
            }
        }
    }
482485
def indentation(logical_line, previous_logical, indent_char,
                indent_level, previous_indent_level):
    
    if indent_char == ' ' and indent_level % 4:
        return 0, "E111 indentation is not a multiple of four"
    indent_expect = previous_logical.endswith(':')
    if indent_expect and indent_level <= previous_indent_level:
        return 0, "E112 expected an indented block"
    if indent_level > previous_indent_level and not indent_expect:
        return 0, "E113 unexpected indentation"
552220
protected String indentText( int level, String text )
    {
        StringBuilder buffer = new StringBuilder();
        String[] lines = text.split( "\n" );
        String prefix = StringUtils.leftPad( "", level );
        for ( String line : lines )
        {
            buffer.append( prefix ).append( line ).append( EOL );
        }
        return buffer.toString();
    }
931791
def plain(node, indent)
      # Text value
      value = node[@options][:value]

      # Pretty print
      if @settings[:pretty]
        indentation = ' ' * indent

        inline = @sibling_stack[-1][-1] &&
                 @sibling_stack[-1][-1][0] == :node &&
                 Settings::INLINE_NODE.include?(@sibling_stack[-1][-1][1])

        # Add current node to the siblings stack
        @sibling_stack[-1] << [node[@type], node[@value]]

        # If we have a text on multiple lines and the text isn't supposed to be
        # inline, indent all the lines of the text
        if node[@value] == :text 
          if !inline
            value.gsub!(/^(?!$)/, indentation)
          else
            buffer_remove_trailing_newline
            value.strip!
          end
        else
          buffer_freeze indentation
        end
      end

      # Leading whitespace
      buffer_freeze ' ' if node[@options][:leading_whitespace]

      # Evaluate text node if it's marked as such and print nodes in the
      # current context
      if node[@value] == :text
        buffer_split_by_interpolation value, node[@options][:escaped]
      else
        node[@options][:escaped] ? buffer_escape(value) : buffer(value)
      end

      # Trailing whitespace
      buffer_freeze ' ' if node[@options][:trailing_whitespace]

      # Pretty print
      if @settings[:pretty]
        buffer_freeze "\n" if !inline or node[@value] == :print
      end
    end
402319
function indentClassLeft( node, classes ) {
		var indentClass = node.$.className.match( this.classNameRegex ),
			isIndent = this.isIndent;

		// If node has one of the indentClasses:
		//	* If it holds the topmost indentClass, then
		//	  no more classes have left.
		//	* If it holds any other indentClass, it can use the next one
		//	  or the previous one.
		//	* Outdent is always possible. We can remove indentClass.
		if ( indentClass )
			return isIndent ? indentClass[ 1 ] != classes.slice( -1 ) : true;

		// If node has no class which belongs to indentClasses,
		// then it is at 0-level. It can be indented but not outdented.
		else
			return isIndent;
	}
1094754
def _indent_line(self, line, stripspace=''):
        """"""

        return re.sub(r"^%s" % stripspace, self.indentstring
                      * self.indent, line)
993178
def indent(value, n=2, character=' '):
    

    prefix = n * character
    return '\n'.join(prefix + line for line in value.splitlines())
705053
protected void indent(Appendable app, int indentLevel) throws IOException {
        for (int i=0; i<indentLevel; i++) {
            app.append(' ');
        }
    }
387379
def indent(text: str, num: int = 2) -> str:
    """"""
    lines = text.splitlines()
    return "\n".join(indent_iterable(lines, num=num))