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

From: Matthieu Moy <[email-masked]>
Date: Thu, 20 Jun 2013 10:53:56 +0200

[email-masked] writes:

> +# @TODO : add documentation for verbose option

I guess that's not applicable anymore.

> +distant mediawiki and combined with a template retrieved from the mediawiki.

s/distant/remote/

> +sub preview {
> +	my $wiki;
> +	my ($remote_url, $wiki_page_name);
> +	my ($new_content, $template);
> +	my $file_content;
> +
> +	if ($file_name eq EMPTY) {
> +		die "Missing file argument, see `git mw help` \n";

Unneeded space before \n.

> +	for (@{ $html_tree->extract_links() }) {
> +		my ($link, $element, $attr) = @{ $_ };
> +		my $url = url($link)->canonical;
> +		$element->attr($attr, URI->new_abs($url, $remote_url));
> +	}

Extracting this into a function like "make_links_absolute" would have
made it clearer.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/