Syntax highlighting improvements
- Ngôn ngữ chính
- Dart
- Star
- 1.7k
- Fork
- 404
- Merge trung bình
- 6 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 18
Mô tả
A couple things I noticed while updating some debugger panel tests:
1. If there is no `grammar`, the `SyntaxHighlighter` returns a `TextSpan` with no children. This is a problem because in `CodeView` (the only place where our `SyntaxHighlighter` is used, we expect the `TextSpan` to have children, and we loop through the children to break the span into lines. Therefore, if there is no grammar, we display the entire script on a single line.
2. We loop through the entire source twice. Once to add the syntax highlighting, and then again to break it into lines. We could see some performance improvements if we do both in one step (see https://github.com/flutter/devtools/issues/5703)
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với SyntaxHighlighter và CodeView, những consumer duy nhất được nêu, sau đó kiểm tra các test của bảng điều khiển debugger được đề cập trong issue. Xác minh hành vi khi không có grammar và đo xem việc syntax highlighting và ngắt dòng có được xử lý trong một lần duyệt source hay không, đồng thời vẫn đảm bảo các test hiện có tiếp tục pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- dart
- Lĩnh vực
- devtools, performance
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100