31 "<hr><table border=0>"
37 " <td><b>" +
_(
"Keywords" ) +
"</b></td>"
38 " <td>__KEYWORDS__</td>"
43 " <td><b>" +
_(
"Documentation" ) +
"</b></td>"
44 " <td><a href=\"__HREF__\">__TEXT__</a></td>"
69 wxCHECK_RET(
m_fp_lib_table, wxT(
"Footprint library table pointer is not valid" ) );
81 wxLogError(
_(
"Error loading footprint %s from library '%s'." ) + wxS(
"\n%s" ),
96 size_t idx = desc.find( wxT(
"http:" ) );
98 if( idx == wxString::npos )
99 idx = desc.find( wxT(
"https:" ) );
101 if( idx != wxString::npos )
105 for(
auto chit = desc.begin() + idx; chit != desc.end(); ++chit )
110 if( ch <= 0x20 || ch >= 0x7F || ch ==
'"' )
116 else if( ch ==
')' && --nesting < 0 )
123 static wxString punct = wxS(
".,:;" );
125 if( punct.find( doc.Last() ) != wxString::npos )
126 doc = doc.Left( doc.Length() - 1 );
132 esc_desc.Replace( wxS(
"\n" ), wxS(
"<br>" ) );
137 m_html.Replace(
"__DESC__", esc_desc );
141 keywordsHtml.Replace(
"__KEYWORDS__",
EscapeHTML( keywords ) );
144 docHtml.Replace(
"__HREF__",
EscapeHTML( doc ) );
146 if( doc.Length() > 75 )
147 doc = doc.Left( 72 ) + wxT(
"..." );
149 docHtml.Replace(
"__TEXT__",
EscapeHTML( doc ) );
151 m_html.Replace(
"__FIELDS__", keywordsHtml + docHtml );
const FOOTPRINT * GetEnumeratedFootprint(const wxString &aNickname, const wxString &aFootprintName)
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
A logical library item identifier and consists of various portions much like a URI.
bool IsValid() const
Check if this LID_ID is valid.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
wxString EscapeHTML(const wxString &aString)
Return a new wxString escaped for embedding in HTML.
wxString UnescapeString(const wxString &aSource)
wxString LinkifyHTML(wxString aStr)
Wraps links in HTML tags.