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