git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 5/5] git-remote-mediawiki: Add preview subcommand into git mw.

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 20, 2013, 09:45 UTC
Message-ID
<vpqhagtazfj.fsf@anie.imag.fr>
In-Reply-To
<1371712593-6210-6-git-send-email-benoit.person@ensimag.fr>
benoit.person@ensimag.fr writes:
> +	for (@{ $html_tree->extract_links() }) {
> +		my ($link, $element, $attr) = @{ $_ };
> +		my $url = url($link)->canonical;
> +		$element->attr($attr, URI->new_abs($url, $remote_url));

Actually, this breaks some relative links, like table of content links, because you consider them relative to URLs like http://example.com/wiki/ but not http://example.com/wiki/index.php/My_Page.

Ideally, links pointing to stg like "#anchor" should not be modified.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Matthieu MoyNext: Matthieu Moy
Message 10 of 12 in “git-remote-mediawiki: new tool to preview local changes without pushing”
  1. 0/5 git-remote-mediawiki: new tool to preview local changes without pushingbenoit.person@ensimag.fr, Jun 20, 2013
  2. 1/5 git-remote-mediawiki: Introduction of Git::Mediawiki.pmbenoit.person@ensimag.fr, Jun 20, 2013
  3. Matthieu MoyJun 20, 2013
  4. 2/5 git-remote-mediawiki: new git bin-wrapper for developementbenoit.person@ensimag.fr, Jun 20, 2013
  5. Matthieu MoyJun 20, 2013
  6. 3/5 git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawikibenoit.person@ensimag.fr, Jun 20, 2013
  7. 4/5 git-remote-mediawiki: Adding git-mw commandbenoit.person@ensimag.fr, Jun 20, 2013
  8. 5/5 git-remote-mediawiki: Add preview subcommand into git mw.benoit.person@ensimag.fr, Jun 20, 2013
  9. Matthieu MoyJun 20, 2013
  10. Matthieu MoyJun 20, 2013
  11. Matthieu MoyJun 20, 2013
  12. Benoît PersonJun 20, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.