From 47bc9957149260df63704f61eb05198d3e5d1100 Mon Sep 17 00:00:00 2001 From: Kyle Gray Date: Thu, 31 Jan 2019 11:31:02 -0500 Subject: [PATCH 1/5] Added React Support --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 88c36e1..96a3b1f 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "multi-root ready" ], "activationEvents": [ - "onLanguage:html" + "onLanguage:html", + "onLanguage:javascriptreact" ], "main": "./client/out/extension", "contributes": { From fac41f6860e902f17c1ecdb9db297f1b31f76aa9 Mon Sep 17 00:00:00 2001 From: Max van der Schee Date: Fri, 8 Feb 2019 20:20:49 +0100 Subject: [PATCH 2/5] Fixed #12 added setup for #11 --- server/src/Patterns.ts | 31 ++++++++++++++++++++++--------- server/src/server.ts | 12 ++++++++++-- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/server/src/Patterns.ts b/server/src/Patterns.ts index 02460be..2493ead 100644 --- a/server/src/Patterns.ts +++ b/server/src/Patterns.ts @@ -1,24 +1,25 @@ /*! patterns.ts * Flamingos are pretty badass! * Copyright (c) 2018 Max van der Schee; Licensed MIT */ -import { - createConnection, - ProposedFeatures -} from 'vscode-languageserver'; +// import { +// createConnection, +// ProposedFeatures +// } from 'vscode-languageserver'; // connection is used for debuging > connection.console.log(); -let connection = createConnection(ProposedFeatures.all); +// let connection = createConnection(ProposedFeatures.all); // Order based om most common types first const patterns: string[] = [ "", "", + "id=\"(?:.)+?\"", "(?:(?:\\s|\\S)+?(?=<\/a>))<\/a>", "", "", "(?:(?:\\s|\\S|)+?(?=<\/head>))<\/head>", "", - "tabindex=\"(?:.)+?\"" + "tabindex=\"(?:.)+?\"", ]; export const pattern: RegExp = new RegExp(patterns.join('|'), 'ig'); @@ -61,7 +62,7 @@ export async function validateDiv(m: RegExpExecArray) { export async function validateSpan(m: RegExpExecArray) { if (!/role=(?:.*?[a-z].*?)"/i.test(m[0])) { - if (//.test(m[0])) { + if (//.test(m[0])) { return { meta: m, mess: 'Change the span to a