def set_block_scalar_indent(TokenClass):
 def callback(lexer, match, context):
  text = match.group()
  context.block_scalar_indent = None
  if (not text):
   return
  increment = match.group(1)
  if increment:
   current_indent = max(context.indent, 0)
   increment = int(increment)
   context.block_scalar_indent = (current_indent + increment)
  if text:
   (yield (match.start(), TokenClass, text))
   context.pos = match.end()
 return callback

def set_block_scalar_indent ( TokenClass ) : def callback ( lexer , match , context ) : text = match . group ( ) context . block_scalar_indent = None if ( not text ) : return increment = match . group ( 1 ) if increment : current_indent = max ( context . indent , 0 ) increment = int ( increment ) context . block_scalar_indent = ( current_indent + increment ) if text : ( yield ( match . start ( ) , TokenClass , text ) ) context . pos = match . end ( ) return callback
set an explicit indentation level for a block scalar .