Function parseParagraph

  • يحلل فقرة واحدة بناءً على نوعها

    Parameters

    • text: string

      نص الفقرة

    Returns Paragraph

    • الفقرة المحللة
    parseParagraph('## عنواني')
    // ==> { type: 'header', level: 2, content: { text: 'عنواني', formats: [] } }
    parseParagraph('هذا نص **عريض** و *مائل*')
    // ==> { type: 'text', content: { text: 'هذا نص عريض و مائل', formats: [...] } }