English > Scripts and Templates
AllMovie+ script: Including data for custom fields
nostra:
Post the whole script.
--- Quote ---TmpStr1 := StringReplace(TmpStr, '<br />', #13#10, True, True, False);
--- End quote ---
This can only happen if the string does not contain "<br />"
--- Quote ---It seems the Copy function removes the <br /> tags
--- End quote ---
No, it certainly does not remove anything
--- Quote ---The result of the Copy function is a set of four CRLF between paragraphs
--- End quote ---
Then you can replace those with one line break.
rick.ca:
--- Quote ---No, it certainly does not remove anything
--- End quote ---
Maybe I misspoke. Let me put it this way: When I use only the Copy function to get the data, the <br /> tags that appeared to be in the source were not present (and apparently replaced by three CRLF's) in the imported text. No other tags "disappeared." Is this thing even a tag? It appears by itself, with no <br>. :-\
--- Quote ---Then you can replace those with one line break.
--- End quote ---
Maybe whatever is going on with this <br /> is mute. Can you just show me how to replace multiple line breaks with one? StringReplace doesn't seem to do anything when I use #13#10 as OldPattern or NewPattern.
nostra:
The problem was:
1. The function RemoveTags used in the parsing procedure does not accept normal line breaks (only HTML tags)
2. You had to replace #13 with #13#10
Fixed script is attached
[attachment deleted by admin]
rick.ca:
Thanks! I think it's safe to say I couldn't have done that if my life depended on it. ;D
I've updated the first post of this topic to include an updated version. It's modified slightly—to reduce the blank lines between paragraphs from two to one. If anyone is wondering, the same change to the Synopsis/Description has not been make because all of those are a single paragraph.
nostra:
--- Quote ---I think it's safe to say I couldn't have done that if my life depended on it. Grin
--- End quote ---
Yes, it was a bit tricky as you needed an alternative RemoveTags function, but I think now you will be able to solve such problems with ease ;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version