Skip to content

Commit

Permalink
fix: handle emoji characters
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Mar 2, 2019
1 parent c06ef90 commit c06179e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/screens/trending.dart
Expand Up @@ -52,7 +52,12 @@ class _TrendingScreenState extends State<TrendingScreen> {
?.innerHtml
?.replaceFirst(RegExp(r'^[\s\S]*span>'), '')
?.trim(),
'description': item.children[2].querySelector('p')?.innerHtml?.trim(),
'description': item.children[2]
.querySelector('p')
?.innerHtml
?.trim()
?.replaceAll(RegExp(r'<g-emoji.*?>'), '')
?.replaceAll(RegExp(r'</g-emoji>'), ''),
'stargazers': {
'totalCount': item.children[3]
.querySelectorAll('a')[0]
Expand Down

0 comments on commit c06179e

Please sign in to comment.