Skip to content

Commit

Permalink
🔀 Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dudeofawesome committed Feb 12, 2018
2 parents d0d966a + 7ad4e30 commit f4d0228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/utils/regexes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ final htmlTagA = new RegExp(r'\<a.*?href\=\\?"(' + urlSafeCharacters + r'*)\\?".
final urlSafeCharacters = r"[a-zA-Z0-9\-\.\_\~\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=]";
final fullUri = new RegExp(r'(\S+)\:\/\/([^\/\s]+)([\S]*)', caseSensitive: false);
final looseUrl = new RegExp(r'((\S+)\:\/\/)?([^\/\s]+?\.[^\/\s]{2,})([\S]*)', caseSensitive: false);
final gfmAutolinkUrl = new RegExp(r'(?:^|[\s*_~(>])(?:(?:https?|ftp):\/\/|www\.)[\w\-][\w\-.]+[^\s<]*', caseSensitive: false);
2 changes: 1 addition & 1 deletion lib/utils/simple_html_to_markdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SimpleMarkdownConversion {
new RegExp(r'^([0-9]+)\.', caseSensitive: false),
(match) => '${match[1]}\\.'
)
.replaceAllMapped(looseUrl, (match) {
.replaceAllMapped(gfmAutolinkUrl, (match) {
try {
Uri.parse(match[0]);
return '[${match[0]}](${match[0]})';
Expand Down

0 comments on commit f4d0228

Please sign in to comment.