Changeset 144

Show
Ignore:
Timestamp:
Sun Aug 24 08:33:38 2008
Author:
mbutscher
Message:

branches/stable-1.8:

* Bug fixed: Sometimes too many empty lines in internal

preview
* Bug fixed: Startup error if no printer is installed
* Bug fixed: Segfault of sqlite on 64-bit Linux (thanks to
Anton Markov)
* Bug fixed: "anded" regex search searched only for first
term (thanks to milus)
* Bug fixed: Problems with temp-path for external plugins
on Linux (thanks to jonjacksonuk and franxxk)
* Linux standard encoding is now determined by
locale.getpreferredencoding() (thanks to Kamil Śliwak)

Files:

Legend:

Unmodified
Added
Removed
Modified
  • branches/mbutscher/TodoList.txt

    r139 r144  
    2 2  
    3 3  
      4 > When exporting a page (or pages) to a single (or many) HTML files, I  
      5 > have noticed that any linked image files are NOT copied to the HTML  
      6 > output folder... ie they don't exist when viewed in the browser. The  
      7 > sources says they are expected to exist in a <files> subfolder but  
      8 > this doesn't get created either.  
      9 >  
      10 > Interestingly, any dynamically created output (say from neato or  
      11 > dot.exe) ARE copied into the output - but NOT into a <files>  
      12 > sub-folder, but as images in the export directory.  
      13 >  
      14 > This all seems a bit inconsistent!!. Perhaps for EXPORT then ALL files  
      15 > should end up in a single folder? (sort of - as specified by the user?)  
      16  
      17 Export option does not copy files referenced in directory "/files".  
      18  
      19  
      20 Stop the Clipboard catcher from catching text from itself !  
      21 *Details*:  
      22 Switch off only for catching at cursor  
      23  
      24  
      25 <<  
      26 So I would suggest:  
      27 >  
      28 > http://www.blahblah.com/thisisimage.jpg>s*2  
      29 >  
      30 > http://www.blahblah.com/thisisimage.jpg>s/2  
      31 >  
      32 > http://www.blahblah.com/thisisimage.jpg>s250x150  
      33 >  
      34 >  
      35 > as syntax.  
      36 >  
      37 >  
      38 > The 's' is there to allow to add other commands later (prefixed with  
      39 > other letters).  
      40 >>  
      41 *Details*:  
      42 Also allow to set alignment (Done)  
      43  
      44  
      45 > I keep my entries pretty heavily cross-referenced, and most of them  
      46 > are written in prose, so I usually use [Not Camel Case] wiki words,  
      47 > and add aliases for pluralizations, -ing, -est, and other alternate  
      48 > endings, so as not to break the flow of the writing.  
      49 *Details*  
      50 Different attributes for camel-case and non-camelcase  
      51  
      52  
      53 <<pre  
      54 Is it possible to insert one page into another (e.g. using insertion  
      55 with :page:) in a way that it follows the current nesting level?  
      56  
      57 e.g. we have page A:  
      58  
      59 [:page: B]  
      60  
      61 and page B:  
      62  
      63  
      64 and I want result to be:  
      65  
      66 >>  
      67  
      68  
      69  
      70 > Are there keyboard shortcuts for folding and unfolding, as well as to  
      71 > skip to the next/previous header? (I guess skipping to the structure  
      72 > window and using arroes would be a workaround... if we could skip  
      73 > there ;) anyway it wouldn'i be very efficient)  
      74  
      75  
      76 *Details*:  
      77 Needs 2.0 format change  
      78  
      79  
    4 80 +++ Command line call plugin  
    5 81 >> For example, the user could select some text in the editor and press a  
     
    11 106  
    12 107  
      108 > Whichever of these solutions is embraced, I believe that something  
      109 > like &&t and &&T tokens should definitely be added to the FORM (not  
      110 > template) syntax, allowing explicit insertion of the space-separated  
      111 > (&&t) or non-space-separated (&&T) originating wiki words. Along  
      112 > similar lines, I believe that forms should interpret a variety of  
      113 > other auto insertion codes in addition to &&i. (The one that comes to  
      114 > mind as absolutely necessary is &&d for the current date/time.)  
      115 *My answer*  
      116 As these fields should be filled automatically when creating a new page from a template (unlike the &&i token) they should get some sort of prefix letter to distinguish them from &&i and because the space of available letters is rather small.  
      117  
      118 So I would recommend &&at, &&aT, &&ad as tokens. The "a" stands for automatic replace (not very creative, I know :-) ).  
      119  
      120  
    13 121 +++ Add document structure window to F6 cycle  
    14 122 *Details*:  
     
    28 137  
    29 138  
    30   +++ Tree context menu: URL to clipboard  
    31   convenience would not hurt :) Like ability to copy topic urls directly  
    32   from the tree with right click :)  
    33    
    34    
    35   +++ More form field types  
    36   > Whichever of these solutions is embraced, I believe that something  
    37   > like &&t and &&T tokens should definitely be added to the FORM (not  
    38   > template) syntax, allowing explicit insertion of the space-separated  
    39   > (&&t) or non-space-separated (&&T) originating wiki words. Along  
    40   > similar lines, I believe that forms should interpret a variety of  
    41   > other auto insertion codes in addition to &&i. (The one that comes to  
    42   > mind as absolutely necessary is &&d for the current date/time.)  
    43   *My answer*  
    44   As these fields should be filled automatically when creating a new page from a template (unlike the &&i token) they should get some sort of prefix letter to distinguish them from &&i and because the space of available letters is rather small.  
    45    
    46   So I would recommend &&at, &&aT, &&ad as tokens. The "a" stands for automatic replace (not very creative, I know :-) ).  
      139 I would like to automate certain things like wiki word creation (for  
      140 example through other programs) Is there a way to pass arguments to  
      141 wikipad.exe that would perform certain actions on currently opened  
      142 database-selected database like opening or deleting a wiki word or  
      143 adding a sentence to end of a certain wiki word page?  
    47 144  
    48 145  
     
    57 155  
    58 156  
      157 E.g.  
      158 \[:imageicon:notepad]  
      159  
      160  
    59 161 +++ Functions for middle click on tab  
    60 162 Possibilities:  
     
    63 166  
    64 167  
    65   +++ On HTML export copy files and create insertion output in separate "files" directory  
    66   > When exporting a page (or pages) to a single (or many) HTML files, I  
    67   > have noticed that any linked image files are NOT copied to the HTML  
    68   > output folder... ie they don't exist when viewed in the browser. The  
    69   > sources says they are expected to exist in a <files> subfolder but  
    70   > this doesn't get created either.  
    71   >  
    72   > Interestingly, any dynamically created output (say from neato or  
    73   > dot.exe) ARE copied into the output - but NOT into a <files>  
    74   > sub-folder, but as images in the export directory.  
    75   >  
    76   > This all seems a bit inconsistent!!. Perhaps for EXPORT then ALL files  
    77   > should end up in a single folder? (sort of - as specified by the user?)  
    78    
    79    
    80   +++ Shortcuts to go to next/previous heading  
    81   > Are there keyboard shortcuts for folding and unfolding, as well as to  
    82   > skip to the next/previous header? (I guess skipping to the structure  
    83   > window and using arroes would be a workaround... if we could skip  
    84   > there ;) anyway it wouldn'i be very efficient)  
    85    
    86    
    87 168 +++ Wikize word enhancements  
    88 169 the first letter of words will be upper case (e.g. 'case' becomes [Case]) when wikized. Also I suggest wikizing should behave like bold and italics. (i.e. if the cursor is inside a wo|rd, it should wikize the whole [word], not like 'wo[]rd'.)  
     
    124 205  
    125 206  
    126   +++ Remember expanded nodes in tree  
    127   > Another SUGGESTION on the Collapse Tree theme:  
    128   > Do you think the tree-collapsing could be remembered? I mean if I have  
    129   > several level depth of nodes open and I collapse the first level, it  
    130   > would remember which nodes were expanded? So, when I expand the first  
    131   > level node again, not only would the next level nodes be expanded but  
    132   > all that was open before I collapsed it? (Well, I am not very clear  
    133   > about this, am I?)  
    134   *Details:*  
    135   Allow this also for "Views" and subnodes:  
    136   > Could just let the "views" > Modified-within section open as it was when  
    137   > closed. IOW if it was expanded leave it that way. Mine (v1.7) defaults  
    138   > to closed.  
      207 We already have the ability to create freely customizable "attributes"  
      208 for pages via a construct like [tags:mytag1;mytag2] and so on.  
      209 Essentially this resembles rather flat hierarchy of attribute / value  
      210 pairs. A great impürovement would be hierarchical categories.  
      211 Also wonderful and even more important for me would be the ability to  
      212 create content on a "category page".  With this I could do the  
      213 following: I create a page for a character I use in a story:  
      214 StoryCharacter where I describe its features. Then, whenever I write a  
      215 scene this character appears in I could set a tag like  
      216 [character:StoryCharacter] and automatically this new scene would  
      217 appear under the character in the tree. Ofcourse I can make a normal  
      218 link to the character in the storypage and then see the referring  
      219 pages when I press strg+uparrow, but having them appear in the tree  
      220 would be even nicer.  
      221  
    139 222  
    140 223  
     
    168 252  
    169 253  
      254 Also tab color should be defined either in the wiki page (with  
      255 overwriting tag that can overwrite tab color settings ) or on the tab  
      256 with right click(with overwriting page color setting)  
      257  
      258  
    170 259 +++ Modification time ordering  
    171 260 I think it would be a great addition to have ability to sort based on  
     
    177 267  
    178 268  
      269 this  
      270 <!-- HTML Comment -->  
      271  
      272 Dosnt work in the wiki.  
      273  
      274 In Preview i can read it, this would be ok.  
      275  
      276 But when i export the wikiword then wikidpad translate  
      277 the <!-- and --> in HTML Entitys so the Browser shows  
      278 it at all.  
      279  
      280  
      281  
      282 I start-up WikidPad with command line parameters  
      283 which open my wiki with 4 different tabs. I use them as them as a sort  
      284 of bookmarks. Problem is I click away while working on things and with  
      285 time, the 4 tabs point to four useless pages, instead of my favorites.  
      286 A solution to this would be tabs that can be "locked" while still  
      287 allowing navigation. in other words, when I click away to another tab,  
      288 I want the tab i'm switching away from to switch back to pointing at  
      289 the initial page. this could be done, with an (un)checkable context  
      290 menu item for each tab.  
      291 I know I could use bookmarks, but that's the long way for something  
      292 that could be done the way described above.  
      293  
      294  
      295  
      296 Are you sure ? Is this a directive that must be followed at any cost ?  
      297 Or is it something that _at first sight_ contradicts the way WikidPad  
      298 functions ? Cause in my opinion, structure isn't out of the scope of  
      299 WikidPad. And if there are views that will help you structure things,  
      300 there might very well be, at least in my humble opinion a secondary  
      301 right-pane. Where you could structure things differently, independent  
      302 from the way in which linking imposes a structure. Why couldn't we  
      303 have an extra tree ? An independent and parallel one ? Two tabs for  
      304 two trees, one linking freely, another... "artificially".  
      305  
      306  
    179 307 +++ Graphical view of interconnection between pages  
    180 308 > I like the wikidpad application, though I wish it would use a tab to  
     
    207 338  
    208 339  
      340 I'm trying to do something like this:  
      341 anchor: here  
      342 a lot of WikiText :-)  
      343 a jump to the upper «here» [MyWikiPageName|Up]!here  
      344 ok, it works, but now I' like to replace the «Up» by a small icon up.png  
      345 I've tried this [MyWikiPageName|file:///D|/MyWiki/up.png>i]!here  
      346 changing the ViewText «Up» by the path and filename of the pretended  
      347 icon, appended >i (to show link as image) and indicating the anchor !here  
      348 Didn't work :-( Shows the link.  
      349 Is it possible or is only my wish?  
      350 My work is a kind of list with an upper menu. Each list item should  
      351 link to the menu position to make it possible to choose another item  
      352 rather than pressing [CTRL]+[HOME] (My menu is not really at the top  
      353 of the document) or using [PGDn] or [PGUp] to locate the needed item.  
      354 I'd prefer to have an icon rather than the word up, or top or menu...  
      355  
      356  
      357 It will be nice to get the search results in a tab, so that you can  
      358 switch to it after trying a link.  
      359  
      360 Right now it pops up and vanishes after you click one link. If that  
      361 turns out to be the wrong one, you need to do the search again.  
      362  
      363  
      364 > * Search option might be more tolerant for special characters. Eg.  
      365 > search for "Rene" should find "René" and "Rube" should find "Rübe".  
      366  
      367  
      368 > * Simplified interface for boolean search: <some special key> opens a  
      369 > single entry, and all its input is interpreted as boolean AND.  
      370 > Example: Input of "Wikidpad software changes" is interpreted as  
      371 > boolean search for "Wikidpad AND Software AND changes".  
      372  
      373  
      374  
      375  
      376  
    209 377  
    210 378 +++ Option for placement of "modified-within" (and other views in general).  
     
    212 384  
    213 385  
      386 3. ...and most importantly. Please implement drag-and-drop. Allow me  
      387 to select text and just drag-it to a sibling to add the contents to  
      388 it. Would save a lot of time. Holding ctrl or alt or something while  
      389 draging into a sibling could create a new sub-sibling of that sibling  
      390 and pop-up a "readily available" input box to name give it a name.  
      391  
      392 Select. Copy. Click on sibling. Scroll down. Click on page. Paste. Go  
      393 back to initial position. Repeat.  
      394 vs.  
      395 Select. Drag. Repeat.  
      396  
      397  
      398 to enable drag-and-drop for the purpose of easily creating a new  
      399 wikiword from a snippet on a page. I could drag paragraphs from the  
      400 ScratchPad for example, into the tree, and WikiPad would create a new  
      401 page, containing what has been dragged while automatically offering an  
      402 input-box asking for a new wikiword, a label for that new page. This  
      403 procedure has it's advantages over the "Replace text by Wikiword". It  
      404 spares you time, you'll still have to select and name, but:  
      405  
      406 - you won't have to click on the menues or press Ctrl-Shift-R  
      407 - you won't have to cut  
      408 - and paste (move) the new word to it's new place  
      409 - by selecting the parent page from the tree  
      410 - and then clicking inside that page  
      411  
      412 All the above reduces to: select, drag-and-point-and-drop and name.  
      413 Might not look like this would take too long, but if you have to do it  
      414 over and over again... it might take a while. This approach would make  
      415 things a snap. Whether the new wikiword is appended at the end or  
      416 begging of the page it is being dragged over to, could be specified  
      417 with an option or by holding down or not a modifier key.  
      418  
      419  
    214 420 +++ About Inter-process comm.  
    215 421 Or if there'd be an option to maximize it [already open instance] when I launch it 2nd time (I could create a hot-key to launch it).  
     
    266 474  
    267 475  
      476 * Search option might be more tolerant for special characters. Eg.  
      477 search for "Rene" should find "René" and "Rube" should find "Rübe".  
      478  
      479  
    268 480 +++ Plugin for context menu(s)  
    269 481 > How would I go about creating an additional entry in the right-click  
     
    335 548  
    336 549  
      550  
      551  
    337 552 +++ More customization of shortcuts especially multiple date formats  
    338 553 <<  
     
    359 574  
    360 575  
      576 Clicking on a picture of reduced size might open the picture in  
      577 original size.  
      578  
      579  
    361 580 +++ Save tree root between sessions  
    362 581  
     
    561 781  
    562 782  
    563   +++ Insertion for internal icons  
    564   E.g.  
    565   \[:imageicon:notepad]  
      783 > 10) How about making notes using one's own handwriting, for example  
      784 > using the mouse.  
    566 785  
    567 786  
     
    573 793  
    574 794  
    575   +++ Image resizing, attributes (absolute size setting done)  
    576   <<  
    577   So I would suggest:  
    578   >  
    579   > http://www.blahblah.com/thisisimage.jpg>s*2  
    580   >  
    581   > http://www.blahblah.com/thisisimage.jpg>s/2  
    582   >  
    583   > http://www.blahblah.com/thisisimage.jpg>s250x150  
    584   >  
    585   >  
    586   > as syntax.  
    587   >  
    588   >  
    589   > The 's' is there to allow to add other commands later (prefixed with  
    590   > other letters).  
    591   >>  
    592   *Details*:  
    593   Also allow to set alignment (Done)  
    594    
    595    
    596    
    597    
    598 795 +++ HTML export: Should export XHTML  
    599 796 > 1. Is there anyway to export wikis as XHTML files? It seems like the  
     
    635 832  
    636 833  
      834 It would be really great if incremental and global search could center and  
      835 highlight found words in preview mode. (It's more beautiful to 'surf' and  
      836 'search' the wiki in preview mode)  
      837  
    637 838  
    638 839 +++ Timer hook  
     
    735 937  
    736 938  
      939 > 13) You have an 'insert date' function in the 'editor' menu. An  
      940 > separate 'insert time' function can be useful too. For example, if you  
      941 > make several notes on a particular day. The first time, you could  
      942 > insert the date, on subsequent occasions inserting the time would be  
      943 > enough.  
      944  
      945  
    737 946 +++ Wikiwords in todo items  
    738 947 I often tie WikiWords to todo items: \todo.personal: CallBank? Where CallBank? is a page with a bunch of information. The problem is that the CallBank? page does not appear as a subitem in the tree, and shows up as parentless in the views. It seems like that should get picked up by the system and handled like any other wiki page.  
     
    1132 1342  
    1133 1343  
    1134    
    1135 1344 +++ Random word at startup  
    1136 1345 > Michael--Thanks for incorporating the "First word at startup" option  
  • branches/stable-1.8/setup.py

    r135 r144  
    11 11     version = '1.8',  
    12 12     name = "WikidPad",  
    13       copyright = "(C) 2005-2007 Jason Horman, Michael Butscher, Gerhard Reitmayr",  
      13     copyright = "(C) 2005-2008 Jason Horman, Michael Butscher, Gerhard Reitmayr",  
    13 13     description = "Single user wiki notepad",  
    14 14     comments="",  
  • branches/stable-1.8/WikidPadStarter.py

    r142 r144  
    25 25 # (2, 0, 200, 0) is 2.0final  
    26 26  
    27   VERSION_TUPLE = ("wikidPad", 1, 8, 114, 0)  
      27 VERSION_TUPLE = ("wikidPad", 1, 8, 115, 0)  
    27 27  
    28   VERSION_STRING = "wikidPad 1.8rc14"  
      28 VERSION_STRING = "wikidPad 1.8rc15"  
    28 28  
    29 29 if not hasattr(sys, 'frozen'):  
  • branches/stable-1.8/wikidpad_unicode.iss

    r142 r144  
    39 39 SolidCompression=true  
    40 40 AppName=WikidPad  
    41   AppVerName=WikidPad 1.8rc14  
      41 AppVerName=WikidPad 1.8rc15  
    41 41 DefaultDirName={pf}\WikidPad  
    42 42 DefaultGroupName=WikidPad  
    43 43 AppID={{22A83C29-58A8-4CAB-8EDC-918D74F8429E}  
    44   VersionInfoVersion=1.8.114.0  
    45   VersionInfoTextVersion=WikidPad 1.8rc14  
      44 VersionInfoVersion=1.8.115.0  
      45 VersionInfoTextVersion=WikidPad 1.8rc15  
    46 46 LicenseFile=C:\DATEN\Projekte\Wikidpad\Current\license.txt  
    47 47 AllowNoIcons=true  
    48 48 ShowLanguageDialog=yes  
    49 49 Compression=lzma/ultra  
    50   OutputBaseFilename=WikidPad-1.8rc14  
      50 OutputBaseFilename=WikidPad-1.8rc15  
    50 50 InternalCompressLevel=ultra  
    51 51 AppCopyright=© 2005-2008 Jason Horman, Michael Butscher, Gerhard Reitmayr  
  • branches/stable-1.8/WikidPadHelp/WikidPadHelp.wiki

    r139 r144  
    4 4 [main]  
    5 5 footnotes_as_wikiwords = False  
    6   last_wiki_word = ChangeLog  
      6 tree_expandednodes_descriptorpathes_main = wikipage/WikidPadHelp,wikipage/SearchingTheWiki;wikipage/WikidPadHelp  
      7 last_wiki_word = WikidPadHelp  
    7 8 filestorage_identity_moddatemustmatch = False  
    8 9 wiki_name = WikidPadHelp  
      10 tree_last_root_wiki_word = WikidPadHelp  
    9 11 wiki_database_type = original_gadfly  
    10 12 wikipagetitleprefix = ++  
     
    12 14 filestorage_identity_moddateisenough = False  
    13 15 further_wiki_words =  
      16 tree_expandednodes_descriptorpathes_views = helpernode/main/view  
    14 17 first_wiki_word = WikidPadHelp  
    15 18  
  • branches/stable-1.8/WikidPadHelp/data/TodoItems.wiki

    r73 r144  
    1 1 + Todo Items  
    2 2  
    3   In WikidPad "todo", "done", "action", "track", "issue" and "question" are  
    4   special keywords that enable you to track important items under the  
    5   "View" menu in the tree.  
      3 In WikidPad "todo", "done", "action", "track", "issue", "question" and  
      4 "project" are special keywords that enable you to track important  
      5 items under the "View" menu in the tree.  
    6 6  
    7 7 todo: I have to do this.  
  • branches/stable-1.8/WikidPadHelp/data/ChangeLog.wiki

    r142 r144  
    2 2  
    3 3  
    4   Jul. 26, 2008 (1.8rc14)  
      4 Aug. 24, 2008 (1.8rc15)  
      5  
      6     * Bug fixed: Sometimes too many empty lines in internal  
      7       preview  
      8     * Bug fixed: Startup error if no printer is installed  
      9     * Bug fixed: Segfault of sqlite on 64-bit Linux  
      10       (thanks to Anton Markov)  
      11     * Bug fixed: "anded" regex search searched only for  
      12       first term (thanks to milus)  
      13     * Bug fixed: Problems with temp-path for external plugins  
      14       on Linux (thanks to jonjacksonuk and franxxk)  
      15     * Linux standard encoding is now determined by  
      16       locale.getpreferredencoding() (thanks to Kamil Śliwak)  
      17  
      18  
      19  
      20 Jul. 26, 2008 (1.8rc14, repository revision in "stable-1.8" branch: 142)  
    5 21  
    6 22     * Better handling of malformed regular expressions  
     
    12 28  
    13 29  
    14   Jan. 25, 2008 (1.8rc13)  
      30 Jan. 25, 2008 (1.8rc13, repository revision in "stable-1.8" branch: 139)  
    14 30  
    15 31     * Bug fixed: Linux: Some problems with non-ascii characters  
  • branches/stable-1.8/lib/pwiki/WikiTxtCtrl.py

    r141 r144  
    1234 1234             # No scripts allowed  
    1235 1235             # Print warning message  
    1236               wx.MessageBox(u"Set in options, page \"Security\", \n"  
    1237                       "item \"Script security\" an appropriate value \n"  
    1238                       "to execute a script", u"Script execution disabled",  
      1236             wx.MessageBox(_(u"Set in menu \"Wiki\", item \"Options...\", "  
      1237                     "options page \"Security\", \n"  
      1238                     "item \"Script security\" an appropriate value "  
      1239                     "to execute a script."), _(u"Script execution disabled"),  
    1239 1240                     wx.OK, self.presenter.getMainControl())  
    1240 1241             return  
  • branches/stable-1.8/lib/pwiki/Exporters.py

    r139 r144  
    114 114         # Flag to control how to push output into self.result  
    115 115         self.outFlagEatPostBreak = False  
      116         self.outFlagPostBreakEaten = False  
    116 117  
    117 118  
     
    818 819             return  
    819 820  
    820           if self.outFlagEatPostBreak and toAppend.strip() == "<br />":  
      821         if self.outFlagEatPostBreak and toAppend.strip() == u"<br />":  
    820 821             self.outFlagEatPostBreak = eatPostBreak  
      822             self.outFlagPostBreakEaten = True  
    821 823             return  
    822            
      824  
    822 824         if eatPreBreak and len(self.result) > 0 and \  
    823                   self.result[-1].strip() == "<br />":  
      825                 self.result[-1].strip() == u"<br />" and \  
      826                 not self.outFlagPostBreakEaten:  
    824 827             self.result[-1] = toAppend  
    825 828             self.outFlagEatPostBreak = eatPostBreak  
    826 829             return  
    827                
      830          
      831         if self.outFlagPostBreakEaten:  
      832             self.outFlagPostBreakEaten = (toAppend.strip() == u"<br />")  
      833  
    828 834         self.outFlagEatPostBreak = eatPostBreak  
    829 835         self.result.append(toAppend)  
     
    838 844         Then append toAppend to self.result  
    839 845         """  
    840           if len(self.result) > 0 and self.result[-1].strip() == "<br />":  
    841               self.result[-1] = toAppend  
    842           else:  
    843               self.result.append(toAppend)  
      846         self.outAppend(toAppend, eatPreBreak=True)  
      847 #         if len(self.result) > 0 and self.result[-1].strip() == "<br />":  
      848 #             self.result[-1] = toAppend  
      849 #         else:  
      850 #             self.result.append(toAppend)  
    844 851  
    845 852  
     
    1171 1178         self.optsStack = [{}]  
    1172 1179         self.insertionVisitStack = []  
      1180         self.outFlagEatPostBreak = False  
      1181         self.outFlagPostBreakEaten = False  
      1182  
    1173 1183         # deepness of numeric bullets  
    1174 1184         self.numericdeepness = 0  
     
    1410 1420                 pass  # Hide scripts  
    1411 1421             elif styleno == WikiFormatting.FormatTypes.PreBlock:  
    1412                   self.outEatBreaks(u"<pre>%s</pre>" %  
    1413                           escapeHtmlNoBreaks(tok.grpdict["preContent"]))  
      1422                 self.outAppend(u"<pre>%s</pre>" %  
      1423                         escapeHtmlNoBreaks(tok.grpdict["preContent"]), True,  
      1424                         not self.asIntHtmlPreview)  
    1414 1425             elif styleno == WikiFormatting.FormatTypes.Anchor:  
    1415 1426                 if self.wordAnchor:  
     
    1614 1625                     self.statestack.append(("ol", ind))  
    1615 1626                     self.numericdeepness += 1  
    1616                        
    1617                   self.eatPreBreak(u"<li />")  
      1627  
      1628                 self.outAppend(u"<li />", not self.asIntHtmlPreview)  
      1629 #                 self.eatPreBreak(u"<li />")  
    1618 1630  
    1619 1631             elif styleno == WikiFormatting.FormatTypes.Bullet:  
     
    1635 1647                     self.statestack.append(("ul", ind))  
    1636 1648  
    1637                   self.eatPreBreak(u"<li />")  
      1649                 self.outAppend(u"<li />", not self.asIntHtmlPreview)  
      1650 #                 self.eatPreBreak(u"<li />")  
    1638 1651             elif styleno == WikiFormatting.FormatTypes.Suppress:  
    1639 1652                 while self.statestack[-1][0] != "normalindent":  
  • branches/stable-1.8/lib/pwiki/SearchAndReplace.py

    r125 r144  
    131 131             return False  
    132 132              
    133           rightret = self.left.testWikiPage(word, text)  
      133         rightret = self.right.testWikiPage(word, text)  
    133 133          
    134 134         if rightret == False:  
  • branches/stable-1.8/lib/pwiki/StringOps.py

    r142 r144  
    12 12 from struct import pack, unpack  
    13 13  
    14   import difflib, codecs, os.path, random  
      14 import difflib, codecs, os.path, random, locale  
    14 14  
    15 15 import urllib_red as urllib  
     
    69 69     # Could be wrong encoding  
    70 70 #     LINUX_ENCODING = "latin-1"  
    71       LINUX_ENCODING = "utf8"  
      71 #     LINUX_ENCODING = "utf8"  
      72     LINUX_ENCODING = locale.getpreferredencoding()  
      73  
      74     if not LINUX_ENCODING:  
      75         LINUX_ENCODING = "utf8"