AppFlowy-IO / AppFlowy-IO/AppFlowy

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

Aperta
#8,901 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Dart
Stelle
76.6k
Fork
6k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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:

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.