Fix scripts.
This commit is contained in:
parent
f562c3fdf1
commit
8dcde6fdaa
|
@ -21,23 +21,20 @@
|
|||
|
||||
use strict;
|
||||
|
||||
sub vscode_convert_texinfo_image_uri {
|
||||
sub vscode_convert_image_uri {
|
||||
my ( $self, $cmdname, $command, $args ) = @_;
|
||||
|
||||
my $filename = $args->[0]->{'monospacetext'};
|
||||
if ( defined($filename)
|
||||
&& rindex( $filename, 'http://', 0 ) == -1
|
||||
&& rindex( $filename, 'https://', 0 ) == -1 )
|
||||
{
|
||||
$self->set_conf( 'IMAGE_LINK_PREFIX',
|
||||
$self->{'parser'}->{'values'}->{'__vscode_texinfo_image_uri_base'}
|
||||
);
|
||||
}
|
||||
return &{ $self->default_commands_conversion($cmdname) }
|
||||
( $self, $cmdname, $command, $args );
|
||||
my $prefix
|
||||
= ( defined($filename)
|
||||
&& rindex( $filename, 'http://', 0 ) == -1
|
||||
&& rindex( $filename, 'https://', 0 ) == -1 )
|
||||
? $self->{'parser'}->{'values'}->{'__vscode_texinfo_image_uri_base'}
|
||||
: undef;
|
||||
$self->set_conf( 'IMAGE_LINK_PREFIX', $prefix );
|
||||
return &{ $self->default_commands_conversion($cmdname) }(@_);
|
||||
}
|
||||
|
||||
texinfo_register_command_formatting( 'image',
|
||||
\&vscode_convert_texinfo_image_uri );
|
||||
texinfo_register_command_formatting( 'image', \&vscode_convert_image_uri );
|
||||
|
||||
1;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this notice are preserved. This file is offered as-is, without any warranty.
|
||||
*/
|
||||
|
||||
const fs = require('fs')
|
||||
const fs = require('fs');
|
||||
const yazl = require('yazl');
|
||||
|
||||
async function addPathToZipFile(zipFile, path) {
|
||||
|
|
|
@ -19,10 +19,11 @@ minify-xml --output extension.vsixmanifest{,}
|
|||
cd extension
|
||||
# Minify JSON files.
|
||||
json -j0 -I -e "$PACKAGE_JSON_CLEANUP_JS" -f package.json
|
||||
sed -i '' -e '2d' package.json
|
||||
perl -pi -e 'chomp if eof' package.json
|
||||
json5 -o language-configuration.json{,}
|
||||
# Remove comments from Markdown files.
|
||||
sed -i '' -e '1,8d' README.md CHANGELOG.md
|
||||
tail -n +9 README.md > _ && mv _ README.md
|
||||
tail -n +9 CHANGELOG.md > _ && mv _ CHANGELOG.md
|
||||
cd ext
|
||||
# Minify Perl scripts.
|
||||
if [ -x "$(command -v perltidy)" ]; then
|
||||
|
|
Loading…
Reference in New Issue