<s> import markdown <EOL> from yaml import load <EOL> try : <EOL> from yaml import CLoader as Loader <EOL> except ImportError : <EOL> from yaml import Loader <EOL> def parse ( content , modified = None , content_type = None ) : <EOL> """<STR_LIT>""" <EOL> pos1 = content . index ( '<STR_LIT>' ) <EOL> pos2 = content . index ( '<STR_LIT>' , pos1 + <NUM_LIT:1> ) <EOL> header = content [ pos1 : pos2 ] . strip ( ) <EOL> body = content [ pos2 + <NUM_LIT:3> : ] . strip ( ) <EOL> parsed = load ( header , Loader = Loader ) <EOL> if content_type == '<STR_LIT>' : <EOL> body = markdown . markdown ( <EOL> body , <EOL> extensions = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] ) <EOL> parsed [ '<STR_LIT:body>' ] = body <EOL> return parsed </s>
