- Timestamp:
- May 5, 2016, 12:09:19 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Example acronyms.adp
r22 r24 860 860 <DescriptionEndString/> 861 861 </ImportFormat> 862 <ImportFormat> 863 <Id>3</Id> 864 <Name>MediaWiki 2</Name> 865 <AcronymStartString><li></AcronymStartString> 866 <AcronymEndString>—</AcronymEndString> 867 <MeaningStartString/> 868 <MeaningEndString></li></MeaningEndString> 869 <DescriptionStartString/> 870 <DescriptionEndString/> 871 </ImportFormat> 862 872 </ImportFormats> 863 873 <ImportSources> … … 872 882 <ImportFormat>2</ImportFormat> 873 883 </ImportSource> 884 <ImportSource> 885 <Name>Wikipedia - List of energy abbreviations</Name> 886 <URL>https://en.wikipedia.org/wiki/List_of_energy_abbreviations</URL> 887 <ImportFormat>3</ImportFormat> 888 </ImportSource> 874 889 </ImportSources> 875 890 </AcronymDecoderProject> -
trunk/UAcronym.pas
r22 r24 217 217 while (TagBegin > 0) do begin // while there is a < in S 218 218 TagEnd := Pos('>', S); // find the matching > 219 TagLength := TagEnd - TagBegin + 1; 220 Delete(S, TagBegin, TagLength); // delete the tag 221 TagBegin:= Pos( '<', S); // search for next < 219 if TagEnd = 0 then TagLength := Length(S) - TagBegin 220 else TagLength := TagEnd - TagBegin + 1; 221 if TagLength > 0 then 222 Delete(S, TagBegin, TagLength) // delete the tag 223 else Delete(S, 1, TagEnd); // delete the tag 224 TagBegin := Pos( '<', S); // search for next < 222 225 end; 223 226 … … 400 403 401 404 // Meaning 402 P := Pos(Format.Meaning.StartString, S); 403 Delete(S, 1, P + Length(Format.Meaning.StartString) - 1); 405 if Length(Format.Meaning.StartString) > 0 then begin 406 P := Pos(Format.Meaning.StartString, S); 407 Delete(S, 1, P + Length(Format.Meaning.StartString) - 1); 408 end; 404 409 P := Pos(Format.Meaning.EndString, S); 405 410 NewAcronym.Meaning := Trim(StripHTML(Copy(S, 1, P - 1)));
Note:
See TracChangeset
for help on using the changeset viewer.