From 07ec4ca63e5a735315a6cb71f8379556b481924c Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 14 Aug 2019 16:20:17 -0500 Subject: [PATCH] Fix PHP syntax highlighting --- scripts/tasks.bash | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/tasks.bash b/scripts/tasks.bash index 8a5a2039..29af27a7 100755 --- a/scripts/tasks.bash +++ b/scripts/tasks.bash @@ -83,6 +83,17 @@ function build-code-server() { cd "${buildPath}/out/vs/server" && yarn --production --ignore-scripts rm "${buildPath}/out/vs/server/"{package.json,yarn.lock} + # onigasm 2.2.2 has a bug that makes it broken for PHP files so use 2.2.1. + # https://github.com/NeekSandhu/onigasm/issues/17 + local onigasmPath="${buildPath}/node_modules/onigasm-umd" + rm -rf "${onigasmPath}" + git clone "https://github.com/alexandrudima/onigasm-umd" "${onigasmPath}" + cd "${onigasmPath}" && yarn && yarn add --dev onigasm@2.2.1 && yarn package + mkdir "${onigasmPath}-temp" + mv "${onigasmPath}/"{release,LICENSE} "${onigasmPath}-temp" + rm -rf "${onigasmPath}" + mv "${onigasmPath}-temp" "${onigasmPath}" + prepend-loader "out/vs/server/main.js" prepend-loader "out/bootstrap-fork.js"