vscode-extensions.asciidoctor.asciidoctor-vscode: 2.8.9 -> 3.4.2

About the postPatch snippet: The 'asciidoctor' program is no longer used
for previews, instead the extension uses
https://docs.asciidoctor.org/asciidoctor.js (which is bundled with the
extension). See upstream:
https://github.com/asciidoctor/asciidoctor-vscode/issues/443
("Remove Asciidoctor CLI option for preview rendering").
This commit is contained in:
Bjørn Forsman 2025-03-04 19:33:22 +01:00 committed by Masum Reza
parent 2c0585fc38
commit 5d81e7cc68
2 changed files with 22 additions and 8 deletions

View file

@ -0,0 +1,13 @@
diff --git a/package.json b/package.json
index 7ab70e8..2ebe541 100644
--- a/package.json
+++ b/package.json
@@ -437,7 +437,7 @@
},
"asciidoc.asciidoctorpdf_command": {
"type": "string",
- "default": "asciidoctor-pdf",
+ "default": "@ASCIIDOCTOR_PDF_BIN@",
"markdownDescription": "%asciidoc.asciidoctorpdf_command.desc%",
"markdownDeprecationMessage": "%asciidoc.asciidoctorpdf_command.deprecationMessage%",
"scope": "resource"

View file

@ -8,17 +8,18 @@ vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "asciidoctor-vscode";
publisher = "asciidoctor";
version = "2.8.9";
sha256 = "1xkxx5i3nhd0dzqhhdmx0li5jifsgfhv0p5h7xwsscz3gzgsdcyb";
version = "3.4.2";
hash = "sha256-HG3y7999xeE1erQZCnBgUPj/aC0Kwyn20PEZR9gKrxY=";
};
patches = [
./commands-abspath.patch
];
postPatch = ''
substituteInPlace dist/src/text-parser.js \
--replace "get('asciidoctor_command', 'asciidoctor')" \
"get('asciidoctor_command', '${asciidoctor}/bin/asciidoctor')"
substituteInPlace dist/src/commands/exportAsPDF.js \
--replace "get('asciidoctorpdf_command', 'asciidoctor-pdf')" \
"get('asciidoctorpdf_command', '${asciidoctor}/bin/asciidoctor-pdf')"
substituteInPlace package.json \
--replace-fail "@ASCIIDOCTOR_PDF_BIN@" \
"${asciidoctor}/bin/asciidoctor-pdf"
'';
meta = {