[MBS] Tidy output without returns (MBS REALbasic Plugin Mailinglist archive)
Back to the thread list
Previous thread: [MBS] [ANN] MonkeyBread Software Releases the MBS REALbasic plug-ins in version 10.1
Next thread: Re: [MBS] Re: Computer Control
| [MBS] Tidy output without returns |
| Date: 03.03.10 04:17 (Tue, 2 Mar 2010 19:17:10 -0800) |
| From: Dennis Birch |
|
After parsing an HTML document with TidyDocumentMBS.ParseString and .CleanAndRepair, the .SaveString it returns is broken up with Return characters -- chr(13) -- after every 66 or so characters. This is happening after I have replaced line endings in the input text with spaces. Is there some way to get it to not add those Return characters?
_______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list <email address removed> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info |
| Re: [MBS] Tidy output without returns |
| Date: 04.03.10 22:17 (Thu, 4 Mar 2010 13:17:00 -0800) |
| From: Dennis Birch |
|
On Mar 4, 2010, at 9:29 AM, Beatrix Willius wrote:
> I'm not seeing this. > > call theTidy.SetIntegerOption(TidyOptionIdMBS.TidyWrapLen, 0) > > works as expected. I was using the function thusly: t.OptionWrapLen 1 And after copying the saveString to the clipboard then pasting it into a text file, every word of the body text has a Return character after it. So I tried your suggestion: call t.SetIntegerOption(TidyOptionIdMBS.TidyWrapLen, 0) And the same thing happened. Using: t.OptionWrapLen -999999 gets the results I would have expected from setting the TidyWrapLen to 0 according to the documentation. _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list <email address removed> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info |
| Re: [MBS] Tidy output without returns |
| Date: 04.03.10 18:29 (Thu, 4 Mar 2010 18:29:50 +0100) |
| From: Beatrix Willius |
|
Am 03.03.2010 um 22:56 schrieb Christian Schmitz:
> Am 03.03.2010 um 17:03 schrieb Dennis Birch: >> FYI, the OptionWrapLen does not appear to work exactly as >> documented. I set the value to 0 to disable wrapping, but it >> wrapped every word instead. I changed the value to a length I would >> expect to exceed the length of any document I process and that >> worked. > > Well, in that case my documentation may be wrong, or the tidy code > has a bug. I'm not seeing this. call theTidy.SetIntegerOption(TidyOptionIdMBS.TidyWrapLen, 0) works as expected. Mit freundlichen Grüßen/Regards Trixi Willius http://www.mothsoftware.com Mail Archiver X: archive, clean and search email http://www.beatrixwillius.de Fractals, 3d landscapes etc. _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list <email address removed> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info |
| Re: [MBS] Tidy output without returns |
| Date: 03.03.10 22:56 (Wed, 3 Mar 2010 22:56:13 +0100) |
| From: Christian Schmitz |
|
Am 03.03.2010 um 17:03 schrieb Dennis Birch: > FYI, the OptionWrapLen does not appear to work exactly as documented. I set the value to 0 to disable wrapping, but it wrapped every word instead. I changed the value to a length I would expect to exceed the length of any document I process and that worked. Well, in that case my documentation may be wrong, or the tidy code has a bug. > Now I have another issue that I hope you can help with. I'm iterating through an HTML document to obtain all of its nodes as TidyNodeMBS instances, with a variation of the routine you helped me with a few weeks ago. When it does this, it appends a Return character to each node's text. Is there any way to turn off that behavior? I didn't see anything in the current Tidy documentation on your Web site that stuck out as a possible solution. Well, sorry, I don't know here now. Greetings Christian |
| Re: [MBS] Tidy output without returns |
| Date: 03.03.10 17:03 (Wed, 3 Mar 2010 08:03:06 -0800) |
| From: Dennis Birch |
|
On Mar 3, 2010, at 4:57 AM, Christian Schmitz wrote:
> Well, please try a few of the options. Maybe you need to change the OptionWrapLen property? Thanks, Christian. I was working with documentation on my hard drive, from version 9.8 I believe, and it does not include quite a few options you've implemented. That's great to see these additions. FYI, the OptionWrapLen does not appear to work exactly as documented. I set the value to 0 to disable wrapping, but it wrapped every word instead. I changed the value to a length I would expect to exceed the length of any document I process and that worked. Now I have another issue that I hope you can help with. I'm iterating through an HTML document to obtain all of its nodes as TidyNodeMBS instances, with a variation of the routine you helped me with a few weeks ago. When it does this, it appends a Return character to each node's text. Is there any way to turn off that behavior? I didn't see anything in the current Tidy documentation on your Web site that stuck out as a possible solution. _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list <email address removed> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info |
| Re: [MBS] Tidy output without returns |
| Date: 03.03.10 13:57 (Wed, 3 Mar 2010 13:57:36 +0100) |
| From: Christian Schmitz |
|
Am 03.03.2010 um 04:17 schrieb Dennis Birch: > After parsing an HTML document with TidyDocumentMBS.ParseString and .CleanAndRepair, the .SaveString it returns is broken up with Return characters -- chr(13) -- after every 66 or so characters. This is happening after I have replaced line endings in the input text with spaces. Is there some way to get it to not add those Return characters? Well, please try a few of the options. Maybe you need to change the OptionWrapLen property? Greetings Christian |