> Sorry, regex may have been misleading.  I meant that it works by
> string matching rather than dom matching, using javascript's indexOf
> method.  Function locateStoreArea from Saving.js starts with
>         var posOpeningDiv = original.indexOf(startSaveArea);
>         var limitClosingDiv = original.indexOf("<"+"!--POST-
> STOREAREA--"+">");

Perhaps this summary explanation of the 'saveChanges()' processing
will help make things a bit more understandable:

When *saving* a TW file, the core first needs to read in the saved
file content as a text string (to get the *unparsed* source code).
Then, it locates the storeArea DIV within that text (using indexOf
(startSaveArea)) and replaces the existing storeArea with a new one
generated from the current tiddler data.  After a tweaking few more
bits and pieces of the source to insert the content of the Markup*
tiddlers (if any) and update the <title>...</title> block, the entire
updated block of text is then written to the file.

HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to