]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'master' of ssh://git.ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Wed, 18 Apr 2012 19:48:10 +0000 (15:48 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 18 Apr 2012 19:48:10 +0000 (15:48 -0400)
15 files changed:
IkiWiki/Plugin/graphviz.pm
IkiWiki/Plugin/link.pm
IkiWiki/Plugin/trail.pm
debian/changelog
doc/bugs/graphviz_demo_generates_empty_graph.mdwn
doc/bugs/renaming_a_page_destroyed_some_links.mdwn
doc/ikiwiki/directive/graph.mdwn
doc/ikiwiki/directive/sidebar/discussion.mdwn
doc/plugins/trail/discussion.mdwn
doc/style.css
doc/todo/allow_TMPL__95__LOOP_in_template_directives.mdwn
doc/todo/improved_mediawiki_support.mdwn
templates/page.tmpl
themes/actiontabs/style.css
themes/blueview/style.css

index b9f997e04b123a11a50aa9dddac82d982fb2fbf7..d4018edaaf9dad384818488356a3e7e8c4d8841c 100644 (file)
@@ -132,6 +132,7 @@ sub graph (@) {
                }, "text");
                $p->parse($src);
                $p->eof;
+               $s=~s/\[ href= \]//g; # handle self-links
                $params{src}=$s;
        }
        else {
index ef01f110702228fb71356d7d76437161f134b156..1ba28eafd6d4912f16d8aa7fa5c16e01ca9f8dea 100644 (file)
@@ -144,9 +144,9 @@ sub renamepage (@) {
        my $old=$params{oldpage};
        my $new=$params{newpage};
 
-       $params{content} =~ s{(?<!\\)$link_regexp}{
-               if (! is_externallink($page, $2, $3)) {
-                       my $linktext=$2;
+       $params{content} =~ s{(?<!\\)($link_regexp)}{
+               if (! is_externallink($page, $3, $4)) {
+                       my $linktext=$3;
                        my $link=$linktext;
                        if (bestlink($page, linkpage($linktext)) eq $old) {
                                $link=pagetitle($new, 1);
@@ -161,9 +161,12 @@ sub renamepage (@) {
                                        $link="/$link";
                                }
                        }
-                       defined $1
-                               ? ( "[[$1|$link".($3 ? "#$3" : "")."]]" )
-                               : ( "[[$link".   ($3 ? "#$3" : "")."]]" )
+                       defined $2
+                               ? ( "[[$2|$link".($4 ? "#$4" : "")."]]" )
+                               : ( "[[$link".   ($4 ? "#$4" : "")."]]" )
+               }
+               else {
+                       $1
                }
        }eg;
 
index 34a2ca5b681f3a81f985cf0ec5fbad363b1abc46..7d2338f9b9c7bd0dee446b1f0d7b60b80417fb90 100644 (file)
@@ -335,7 +335,7 @@ sub prerender {
                if (exists $pagestate{$member}{trail}{item} &&
                        ! exists $member_to_trails{$member}) {
                        $rebuild_trail_members{$member} = 1;
-                       delete $pagestate{$member}{trailitem};
+                       delete $pagestate{$member}{trail}{item};
                }
        }
 
index b994fb55e599fba46f882f608e26b31d778f5d9d..457bd6a67ec18bebaecdaa80e23867ce1b4deed3 100644 (file)
@@ -21,6 +21,10 @@ ikiwiki (3.20120204) UNRELEASED; urgency=low
     pagenames, not relative wikilink type names. This is necessary to fix
     a bug, and makes pagenames more consistent with the pagespec used
     in the pages parameter. (smcv)
+  * link: Fix renaming wikilinks that contain embedded urls.
+  * graphviz: Handle self-links.
+  * trail: Improve CSS, also display trail links at bottom of page,
+    and a bug fix. (smcv)
 
  -- Joey Hess <joeyh@debian.org>  Wed, 21 Mar 2012 14:33:14 -0400
 
index 239242bbd9a8383fc8e0f25a7247382d6f8e9a1d..5b96f148e531f70084f68b2bcf6844aa3d9bc3ac 100644 (file)
@@ -10,3 +10,6 @@ The following code in our sandbox generates an empty graph:
     """"]]
 
 It is the exact same thing that on the [[ikiwiki/directive/graph/]] directive documentation, from the [[plugins/graphviz]] plugin. This is ikiwiki 3.20120203 on Debian wheezy and graphviz is installed (2.26.3-10). Note that the first demo actually works. See <http://mesh.openisp.ca/sandbox>  --[[anarcat]]
+
+> Looking at the example shows too many double quoted. [[fixed|done]]
+> --[[Joey]] 
index c1c6b5540aaad1e618fb8d04ff8feddc6ca02b9c..0fb717b02c73d5ae72ae29473c45f42b44d3cced 100644 (file)
@@ -4,3 +4,7 @@ When renaming a page here, ikiwiki destroyed unrelated links from unrelated page
 The renamed page was `configuration/bat-hosts` to `configuration/batman/bat-hosts` and the deleted links were ``\[[AUR | https://aur.archlinux.org/]]` and `\[[CHANGELOG|http://svn.dd-wrt.com:8000/browser/src/router/batman-adv/CHANGELOG]]`. --[[anarcat]]
 
 > <del>Nevermind that, that commit was unrelated to the rename and probably an operator error.</del> - No, actually, I just reproduced this again - see [another example](http://mesh.openisp.ca/recentchanges/#diff-d67dc2f0fdc149b13122fd6cba887a01c693e949).
+
+>> Looks like these all involve the wacky wikilink form that includes an
+>> external url in the link. Fixed rename code to know about those.
+>> [[done]] --[[Joey]]
index 8b066c2f2a64fa4f7022f713b9035873a86bbbbd..7021e47fb6a64d7e5c27fba2b98c79fab0275908 100644 (file)
@@ -9,14 +9,14 @@ Nodes on the graph can link to external urls using regular graphviz syntax,
 and a clickable imagemap will be created. As a special extension for
 ikiwiki, [[WikiLinks|ikiwiki/wikilink]] can also be used. For example:
 
-       \[[!graph src=""""
+       \[[!graph src="""
        google [ href="http://google.com/" ]
        sandbox [ href=\[[SandBox]] ]
        help [ href=\[[ikiwiki/formatting]] ]
        newpage [ href=\[[NewPage]] ]
        
        google -> sandbox -> help -> newpage -> help -> google;
-       """"]]
+       """]]
 
 The `graph` directive supports the following parameters:
 
index c7c1aff8e98489e5e899b93abb6f20c1c58a17de..cc2dec2ca5e412b579896f6156daf696d0e5074d 100644 (file)
@@ -1 +1,8 @@
 Things can get messy if you have enabled the global sidebar setting and you browse the `ikiwiki/directive/*` pages. You will get the content of `ikiwiki/directive/sidebar` as a sidebar to all the directives page... I have emptied the sidebar.mdwn page on our wiki to work around that, but isn't this a bug? --[[anarcat]]
+
+> Another reason to dislike the global sidebar option and wish it didn't
+> exist, as if I didn't have a dozen already. However, renaming this page
+> does not seem like an appropriate fix; adding cruft to every directive/
+> page to force the sidebar off does not seem like an appropriate fix; 
+> this leaves only special casing the plugin to not treat this page as a
+> sidebar, but that's disgusting. --[[Joey]] 
index 4218553bb400146d89acbdd36beadc0e46d821d6..7598ed21919f89c944ab6ab2b49ab046348e5aad 100644 (file)
@@ -101,3 +101,5 @@ Some later changes to trail:
 * Fix a possible bug regarding state deletion
 
 --[[smcv]]
+
+> Applied --[[Joey]] 
index 35a133198afc470668629b842f58679195852011..6e2afce66b97075614b067991833ed578b8b195f 100644 (file)
@@ -275,6 +275,7 @@ div.progress-done {
 @media print {
        .actions { display: none; }
        .tags { display: none; }
+       .trails { display: none; }
        .feedbutton { display: none; }
        #searchform { display: none; }
        .blogform, #blogform { display: none; }
@@ -502,6 +503,10 @@ a.openid_large_btn:focus {
        background: url(ikiwiki/images/pbar-ani.gif);
 }
 
+.trails {
+       margin-top: 1em;
+       margin-bottom: 1em;
+}
 .trail {
        display: block;
        clear: both;
index 92ba78be6c0fcc80d7f8247afe2a2831d3c196d1..6d0bd0971e79597a90609a527cdd0a3a211054c7 100644 (file)
@@ -10,6 +10,10 @@ same tag value in a [[plugins/template]] definition.  This, in turn, allows
 us to use TMPL_LOOPS in our [[ikiwiki/directive/template]] directives; all-be-it in a
 rather limited way.
 
+> I'm willing to consider such a feature, but it needs to be presented in
+> the form of a patch that is reviewable, not a gratuitous rewrite.
+> --[[Joey]] 
+
 I would, personally, only use this feature for very basic loops
 and, although nested loops *might* be possible (with a little
 more tinkering) it think any attempt would be better served by
index d872ad680d71c8426ca51e9e970b8f20b08637e3..68cbcf7d4dedb6f215bf4b8c016821b2eb6deff5 100644 (file)
@@ -1,3 +1,9 @@
 [[!tag patch todo wishlist]]
 
 I several updates to the mediawiki plugin to improve compatibility, improving img and File: support.  I'd love to get them upstream.  Is there any interest?  Patches are at [[http://www.isi.edu/~johnh/SOFTWARE/IKIWIKI/index.html]]
+
+> The mediawiki plugin has never been included in ikiwiki, it's
+> [provided by a third party](https://github.com/jmtd/mediawiki.pm) and
+> you should send your patches to them.
+> [[done]]
+> --[[Joey]] 
index 770ac2399ba36b6e1513379db6e00ab87e6c2f98..89b4f3a06805e65d832a3ab279baf8e7e29675ea 100644 (file)
 <TMPL_UNLESS DYNAMIC>
 <TMPL_IF HTML5><nav id="pageinfo"><TMPL_ELSE><div id="pageinfo"></TMPL_IF>
 
+<TMPL_VAR TRAILS>
+
 <TMPL_IF TAGS>
 <TMPL_IF HTML5><nav class="tags"><TMPL_ELSE><div class="tags"></TMPL_IF>
 Tags:
index 26cdc1e86613648fb9b86320702c3314a952e29c..f6cb5c04e1e0e011641464d54fcb718297c7eae6 100644 (file)
@@ -143,7 +143,7 @@ div.recentchanges {
        border-color: #999;
 }
 
-.trails {
+.pageheader .trails {
        /* allow space for the action tabs */
        margin-bottom: 2em;
 }
index 32f4b32eae5d28be68e978a8c6cc3d1c2403e4e1..40a940f265a94f77be5191b124bbb321f3080b45 100644 (file)
@@ -197,23 +197,19 @@ body {
        font-weight: bold;
 }
 
-.pageheader .header .title, .pageheader .header .parentlinks, .pageheader .actions ul li, .pageheader .header span, .pageheader #otherlanguages ul li, .trailprev, .trailnext, .trailup {
+.pageheader .header .title, .pageheader .header .parentlinks, .pageheader .actions ul li, .pageheader .header span, .pageheader #otherlanguages ul li, .pageheader .trailprev, .pageheader .trailnext, .pageheader .trailup {
        padding: 0.25em 0.25em 0.25em 0.25em;
        background-image: url('background_darkness.png');
        background-repeat: repeat;
        color: white;
 }
 
-.pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a, .pageheader #otherlanguages ul li a, .pageheader a {
+.pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a, .pageheader #otherlanguages ul li a, .pageheader a, .pageheader .trail a {
        font-weight: bold;
        color: white;
        text-decoration: none;
 }
 
-.trailprev, .trailnext, .trailup {
-       margin-top: 0.5em;
-}
-
 .pageheader .actions {
        text-align: right;
        vertical-align: bottom;