48 bool operator==(
const UrlSpan &o)
const {
49 return start == o.start && length == o.length;
69std::vector<UrlSpan>
FindUrls(
const wxString &text);
89wxString
ProtectUrls(
const wxString &text, std::vector<wxString> &urls);
92wxString
RestoreUrls(
const wxString &text,
const std::vector<wxString> &urls,
93 const std::function<wxString(
const wxString &)> &format);
wxString RestoreUrls(const wxString &text, const std::vector< wxString > &urls, const std::function< wxString(const wxString &)> &format)
Undoes ProtectUrls(), writing each link as format(url) returns it.
Definition: UrlDetection.cpp:166
bool IsLaunchableUrl(const wxString &url)
Is this a link wxMaxima may hand to the web browser?
Definition: UrlDetection.cpp:140
wxString ProtectUrls(const wxString &text, std::vector< wxString > &urls)
Replaces every link in a text by a placeholder an exporter won't touch.
Definition: UrlDetection.cpp:148
std::vector< UrlSpan > FindUrls(const wxString &text)
Finds every http://, https:// and mailto: link in a piece of text.
Definition: UrlDetection.cpp:103
Where a link sits in a string: the index of its first character and its length.
Definition: UrlDetection.h:45