-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing JavaScript syntax highlight in HTML #83541
Comments
Please share the text of the code along with screenshots |
Also, does this reproduce if you disable all extensions? |
Just a random selector of events Russian history from array. Private use <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>History Random Date Selector</title>
</head>
<body>
<script>
function shuffle() {
$("#text").text('');
// var arrOneDate = ['862-879', '882', '988', '1019-1054', '1116', '1147', '1223', '1237-1240', '1240', '1242', '1380', '1425-1462', '1462-1505', '1497', '1530-1584', '1550', '1565-1572', '1598-1613', '1610-1612', '4 ноя. 1612'];
// var arrTwoDate = ['1613-1645', '1645-1676', '1649', '1672-1725', '1700-1721', '1709', '1714', '1720', '1725-1762', '1762-1796'];
var arrOne = [
// 'Княжение Рюрика в Новгороде', 'Объединение Руси по властью Олега, образование Киевской Руси', 'Крещение Руси (Владимир)', 'Правление Ярослава Мудрого', 'Летопись "Повесть Временных лет"', '1-ое упоминание Москвы (Долгорукий)', 'Битва на р. Калка', 'Походы Батыя на Русь', 'Невская битва', 'Ледовое побоище', 'Куликовская битва', 'Княжение Василия II-Тёмного', 'Княжение Ивана III', 'Судебник Ивана III', 'Годы жизни Ивана Грозного', 'Судебник Ивана Грозного', 'Период опричнины', 'Смутное время', 'Окупация Москвы польскими войсками', 'Освобождение Москвы от интервентов'
];
var arrTwo = ['Период царствования Михаила Романова', 'Царствование Алексея Михайловича', 'Соборное уложение Алексея Михайловича', 'Годы жизни Петра I', 'Северная война'/*, 'Полтавская битва', 'Победа русского флота при мысе Гангут', 'Победа русского флота у о. Гернгам', 'Дворцовые перевороты', 'Царствование Екатеринаы II'*/];
console.log(arrOne.length);
console.log(arrTwo.length);
var arr = arrOne.concat(arrTwo);
console.log(arr.length);
var j, temp;
for (var i = arr.length - 1; i >= 0; i--) {
console.log(i);
j = Math.floor(Math.random() * (i + 1));
temp = arr[j];
arr[j] = arr[i];
arr[i] = temp;
// document.write(arr[i] + "<br>");
$("#text").append(arr[i] + "<br><br>");
}
// return arr;
// document.write(arr);
}
// shuffle();
</script>
<input type="button" onclick="shuffle()" value="press for date">
<br>
<br>
<br>
<div id="text">
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</body>
</html> |
By disabling all extensions nothing happened. But accidentally, when touching extension which has affect on editor, syntax highlight can randomly turning on. After restarting Visual Code syntax highlight again disappeared |
Looks like this is extension related then. I can't reproduce with the example. Did you reload after disabling the extensions so that the disable took effect? |
Yes, I disable all extentions and reload. No JS syntax in HTML |
Also I forgot notice, that issue caused only on VSCode Insider version. Sorry |
simple copy pastable example: <html>
<body>
<h1>testing</h1>
Just a hightlight test.
<script>
const avar = 1.0;
</script>
</body>
</html> Issue is that the contents of
@mjbvz could this be related to the injection work you've done? |
After last update (~29.10.2019) JavaScript syntax not highlight in HTML between tags <script> (InteliSense yet works)
UPD: Issue has only on VSCode Insider
The text was updated successfully, but these errors were encountered: