Skip to content

Commit a802ad8

Browse files
committed
调整代码显示
1 parent a02ed47 commit a802ad8

File tree

2 files changed

+404
-403
lines changed

2 files changed

+404
-403
lines changed

lib/widget/GSYMarkdownWidget.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
22
import 'package:flutter_markdown/flutter_markdown.dart';
33
import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
44
import 'package:gsy_github_app_flutter/common/utils/CommonUtils.dart';
5-
import 'package:gsy_github_app_flutter/widget/syntax_highlighter.dart';
5+
import 'package:gsy_github_app_flutter/widget/SyntaxHighLighter.dart';
66

77
/**
88
* 代码详情
@@ -189,7 +189,8 @@ class GSYMarkdownWidget extends StatelessWidget {
189189
class GSYHighlighter extends SyntaxHighlighter {
190190
@override
191191
TextSpan format(String source) {
192-
print(source);
193-
return new DartSyntaxHighlighter().format(source);
192+
String showSource = source.replaceAll("&lt;", "<");
193+
showSource = showSource.replaceAll("&gt;", ">");
194+
return new DartSyntaxHighlighter().format(showSource);
194195
}
195196
}

0 commit comments

Comments
 (0)