diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-21 11:33:43 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-21 11:34:49 -0400 |
commit | d5e65e582a34ae2494fee493ddcb2b959e4a4bce (patch) | |
tree | 14bf1f7a604406ecb98523eda42c2e864321e1d0 /doc/todo/shortcut_with_different_link_text.mdwn | |
parent | d13200f92b74aa3d4e315809c78f1c2ec6c925a7 (diff) | |
parent | e3a84952715cdd625258e1695cb74898006c31f3 (diff) |
Merge commit 'smcv/prefix'
Conflicts:
doc/news/version_2.49.mdwn
Also fixed the newest news file (and my wikiannounce script).
Diffstat (limited to 'doc/todo/shortcut_with_different_link_text.mdwn')
-rw-r--r-- | doc/todo/shortcut_with_different_link_text.mdwn | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/todo/shortcut_with_different_link_text.mdwn b/doc/todo/shortcut_with_different_link_text.mdwn index 93f9651a4..8615b2754 100644 --- a/doc/todo/shortcut_with_different_link_text.mdwn +++ b/doc/todo/shortcut_with_different_link_text.mdwn @@ -11,7 +11,7 @@ Window System protocol". --[[JoshTriplett]] > If I don't understand this, can you give an HTML example? --[[JeremyReed]] >> The problem is like that in [[bugs/shortcuts_don't_escape_from_Markdown]]. We would like to use ->> the shortcuts plugin but add a descriptive text -- in this case \[[xcbgit src/xcb.xsd|XML Schema...]] +>> the shortcuts plugin but add a descriptive text -- in this case \[[!xcbgit src/xcb.xsd|XML Schema...]] >> The file src/xcb.xsd could be any url, and the point of shortcuts is that you get to shorten it. >> --Ethan @@ -22,7 +22,7 @@ Window System protocol". --[[JoshTriplett]] >>> However, I want to define a [[plugins/shortcut]] to save the typing. If I >>> define something like `protogit` pointing to >>> `http://gitweb.freedesktop.org/?p=xcb/proto.git;a=blob;hb=HEAD;f=%s`, then ->>> I can write `\[[protogit src/xcb.xsd]]`; however, I then can't change the +>>> I can write `\[[!protogit src/xcb.xsd]]`; however, I then can't change the >>> link text to anything other than what the shortcut defines as the link >>> text. I want to write something like >>> `\[[XML Schema for the X Window System Protocol|protogit src/xcb.xsd]]`, @@ -44,22 +44,22 @@ Window System protocol". --[[JoshTriplett]] --- -One possible alternative, would be a general `\[[url ]]` scheme for all kinds of links. As mentioned in [[Short_wikilinks]], I have wanted a way to enter links to the wiki with markdown-style references, +One possible alternative, would be a general `\[[!url ]]` scheme for all kinds of links. As mentioned in [[Short_wikilinks]], I have wanted a way to enter links to the wiki with markdown-style references, specifying the actual target elsewhere from the text, with just a short reference in the text. To facilitate automatic conversion from earlier (already markdownised) "blog", I finally ended up writing a custom plugin that simply gets the location of wikipage, and use markdown mechanisms: Here [is][1] a link. - [1]: [[l a_page_in_the_wiki]] + [1]: [[!l a_page_in_the_wiki]] - Obviously [this]([[l another_page]]) also works, although the syntax is quite cumbersome. + Obviously [this]([[!l another_page]]) also works, although the syntax is quite cumbersome. So that the 'l' plugin inserts the location the page there, and markdown does the rest. My plugin currently fails if it can't find the page, as that is sufficient for my needs. Differing colouring for non-existing pages is not doable in a straightforward manner with this approach. -For external links, that is no concern, however. So you could define for each shortcut an alternative directive, that inserts the URL. Perhaps `\[[url shortcutname params]]` or `\[[@shortcutname params]]` (if the preprocessor supported the @), and this could be extended to local links in an obvious manner: `\[[url page]]` or `\[[@page]]`. Now, if you could just get rid off the parantheses for markdown, for the short inline links --[[tuomov]] (who'd really rather not have two separate linking mechanisms: ikiwiki's heavy syntax and markdown's lighter one). +For external links, that is no concern, however. So you could define for each shortcut an alternative directive, that inserts the URL. Perhaps `\[[!url shortcutname params]]` or `\[[@shortcutname params]]` (if the preprocessor supported the @), and this could be extended to local links in an obvious manner: `\[[!url page]]` or `\[[@page]]`. Now, if you could just get rid off the parantheses for markdown, for the short inline links --[[tuomov]] (who'd really rather not have two separate linking mechanisms: ikiwiki's heavy syntax and markdown's lighter one). --- -I've added code to make the \[[foo 123]] syntax accept a _desc_ +I've added code to make the \[[!foo 123]] syntax accept a _desc_ parameter. I've named it like this to signal that it overrides the _desc_ provided at description time. `%s` is expanded here as well. |