def parse_rst(text, default_reference_context, thing_being_parsed=None):
 overrides = {'doctitle_xform': True, 'inital_header_level': 3, 'default_reference_context': default_reference_context, 'link_base': reverse('django-admindocs-docroot').rstrip('/')}
 if thing_being_parsed:
  thing_being_parsed = force_bytes(('<%s>' % thing_being_parsed))
 parts = docutils.core.publish_parts(text, source_path=thing_being_parsed, destination_path=None, writer_name='html', settings_overrides=overrides)
 return mark_safe(parts['fragment'])

def parse_rst ( text , default_reference_context , thing_being_parsed = None ) : overrides = { 'doctitle_xform' : True , 'inital_header_level' : 3 , 'default_reference_context' : default_reference_context , 'link_base' : reverse ( 'django-admindocs-docroot' ) . rstrip ( '/' ) } if thing_being_parsed : thing_being_parsed = force_bytes ( ( '<%s>' % thing_being_parsed ) ) parts = docutils . core . publish_parts ( text , source_path = thing_being_parsed , destination_path = None , writer_name = 'html' , settings_overrides = overrides ) return mark_safe ( parts [ 'fragment' ] )
convert the string from rest to an xhtml fragment .