Skip to content

Doxygen comments in django/javascript code creating weird behaviour from lexer #1588

@boanergies

Description

@boanergies

With the following code as an example

/**
  * @param {*} cool
  */
func = function(cool) {
};

/**
 * @param {*} stuff
 */
fun = function(stuff) {
};

For some reason the first '*' in '{*}' causes everything after it to be marked a Token.Comment until you hit the second '{*}'. The weirder thing is the behaviour only happens if both '{*}' are present. Remove either one of the '{*}' and it works as expected. Is there a formatter, filter, or another lexer I'm supposed to use to help with doxygen comments?

I confirmed this by running it through the demo you have on your website.

Just to clarify I'm using the javascriptDjangoLexer and I see the behaviour already happen before my filters run so its not any of my custom filters or formatters making something weird happen.

For reference of the correctness of the commenting you can look at JSDoc here

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lexingarea: changes to individual lexers

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy