INNER CODE UNIT · Python

md_parse_line_break

idealo/image-quality-assessment · mkdocs/autogen.py:129

def md_parse_line_break(comment):
    comment = comment.replace('  ', '\n\n')
    return comment.replace(' - ', '\n\n- ')


def to_md(comment_dict):
    doc = ''
    if 'short_description' in comment_dict:
        doc += comment_dict['short_description']
        doc += '\n\n'

    if 'long_description' in comment_dict:
        doc += md_parse_line_break(comment_dict['long_description'])
        doc += '\n'

    if 'Args' in comment_dict and comment_dict['Args'] is not None:
        doc += '##### Args\n'
        for arg, des in comment_dict['Args'].items():

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…