Hirse / brackets-outline-list

Extension for Brackets and Phoenix to display a list of the functions or definitions in the currently opened document.
MIT License
79 stars 30 forks source link

function names are not displayed for syntax errors #104

Closed larushorl closed 6 years ago

larushorl commented 6 years ago

Brackets 1.12.0 Outline 1.1

I use the Brackets to create html-panels for Photoshop CC2015. The programming language is JavaScript, but if there are lines in the text where the XML data is being processed, I get a "syntax error" and no function names in the Outline panel. Is it possible to make the adjustment by disabling the syntax check and entering only the function names in the Outline panel ? default

Hirse commented 6 years ago

The extension is using a parser to generate an abstract syntax tree to extract the function names. Functions can only be listed if the syntax is correct.

In your example, the issue is not processing XML, but rather the usage of @title as a property name. @ is not allowed in JavaScript property and variable names. Try using it as

projXmlData.grproj[i]["@title"].toString()
larushorl commented 6 years ago

good evening May by this is the syntax of JS in Photoshop for working with XML ? ( http://javascript-tools-guide.readthedocs.io/9%20-%20Integrating%20XML%20into%20JavaScript/the-xml-object.html ) The command works, it is simply inconvenient that that because of "error" of a syntax function names are not displayed You can make a customization to your plugin, for example "Do not respond to a syntax error"?

On 24 April 2018 at 02:23, Jan Pilzer notifications@github.com wrote:

Closed #104 https://github.com/Hirse/brackets-outline-list/issues/104.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Hirse/brackets-outline-list/issues/104#event-1590366115, or mute the thread https://github.com/notifications/unsubscribe-auth/AkzU-kcxUDInYl0o5-jCB-57e75xySISks5trmKNgaJpZM4TehG4 .