AppFlowy-IO / AppFlowy-IO/AppFlowy

[FR] Add syntax highlighting support for Alif (Arabic Programming Language) in code blocks

Ouverte
#8,901 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Dart
Étoiles
76.6k
Forks
6k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Description

When writing documentation, tutorials, or personal notes in Arabic using AppFlowy, developers and educators who use Alif (لغة البرمجة العربية ألف) cannot get syntax highlighting inside code blocks.

Currently, selecting standard languages (such as Python or C++) does not recognize native Arabic keywords (e.g., دالة, متغير, إذا, طبع), leaving the code unhighlighted or rendering as plain text.

1. Language Option: Add Alif (or ألف) to the language selection dropdown in AppFlowy's code block component.

2. Syntax Highlighting: Implement basic syntax rules for Alif code constructs:

Keywords: دالة, متغير, إذا, وإلا, لكل, طالما, إرجاع, صنف, استورد, صحيح, خطأ

Built-in Functions: طبع(), قراءة(), نوع()

Comments: Single-line comments starting with #

Strings & Numbers: Arabic and standard string literals ("...", '...') and numbers

3. RTL / Text Rendering: Ensure code
blocks containing right-to-left (RTL) Arabic syntax display smoothly without text layout or character wrapping issues.

### Impact

Supporting Alif in AppFlowy will greatly improve the experience for Arabic-speaking developers, educators, and students who use AppFlowy for tech documentation and learning management.

### Additional Context

Alif Language Repository: [github.com/alifcommunity/Alif](https://github.com/alifcommunity/Alif)

Sample Alif Code Snippet:

مقتطف الرمز
# برنامج بسيط بلغة ألف
دالة رئيسية()
الاسم = "عالم"
إذا الاسم != "":
طبع("أهلاً بك يا ", الاسم)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.