Skip to content

Commit

Permalink
third party lib updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmunro committed Oct 11, 2018
1 parent 8af230b commit ac72e9a
Show file tree
Hide file tree
Showing 17 changed files with 1,182 additions and 741 deletions.
8 changes: 8 additions & 0 deletions third_party/Html2Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class Html2Text
'/—/i', // m-dash in win-1252
'/&(amp|#38);/i', // Ampersand: see converter()
'/[ ]{2,}/', // Runs of spaces, post-handling
'/'/i', // The apostrophe symbol
);

/**
Expand All @@ -125,6 +126,7 @@ class Html2Text
'—', // m-dash
'|+|amp|+|', // Ampersand: see converter()
' ', // Runs of spaces, post-handling
'\'', // Apostrophe
);

/**
Expand Down Expand Up @@ -434,10 +436,16 @@ protected function buildlinkList($link, $display, $linkOverride = null)

return $display . ' [' . ($index + 1) . ']';
} elseif ($linkMethod == 'nextline') {
if ($url === $display) {
return $display;
}
return $display . "\n[" . $url . ']';
} elseif ($linkMethod == 'bbcode') {
return sprintf('[url=%s]%s[/url]', $url, $display);
} else { // link_method defaults to inline
if ($url === $display) {
return $display;
}
return $display . ' [' . $url . ']';
}
}
Expand Down
Loading

0 comments on commit ac72e9a

Please sign in to comment.