AppFlowy-IO / AppFlowy-IO/AppFlowy

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

Đang mở
#8,901 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Dart
Star
76.6k
Fork
6k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.