vscode-code-outline
vscode-code-outline copied to clipboard
Code outline with EJS files
Hello, Running Vscode w/Code Outline - thanks for a great extension.
I'm having an issue when editing EJS files with warning message "Cannot read property 'toLowerCase' of undefined".
When I collapse Code Outline (or disable the extension) the warning disappears.
Is there an update or setting for this? Is there something more I can send to help diagnose?
Thanks. Rob
I'll investigate. Could you provide a short file that reproduces this and does not contain any sensitive information?
Hi. The following code will trigger the warning message. It uses a few variables and displays a list of users in an html table. Please see the comment below that reads: the block below is suspect with code outline.
When I remove the for() block the warning disappears. Please let me know if this is enough for you. Thanks!
<html>
<head>
<title><%= title %></title>
<link rel='stylesheet' href='/stylesheets/style.css' />
</head>
<body>
<h1>USERS <%= heading %></h1>
<table border width="60%">
<tr align="left">
<th>NAME</th>
<th>ID</th>
</tr>
<!-- the block below is suspect with code outline -->
<% for(var i=0; i < myUsers.length; i++) { %>
<tr>
<td><%= myUsers[i].name %></td>
<td><%= myUsers[i].id %></td>
</tr>
<% } %>
</table>
</body>
</html>
Hi. Just a quick ping regarding ejs parsing. Thanks.
ping
Sorry, I'll get around to it eventually but it's unfortunately not my daily job. The source code is public so maybe you could start investigating on your own?