Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

Support for Pug and HTML #89

Open
brianmhunt opened this issue Oct 12, 2017 · 1 comment
Open

Support for Pug and HTML #89

brianmhunt opened this issue Oct 12, 2017 · 1 comment

Comments

@brianmhunt
Copy link

It'd be great to jump around and to HTML/Pug (formerly Jade) source files, especially with a template-heavy web framework like Knockout.

Samples IDs:

<div id="my-id"></div>

And Pug:

div#my-id

Cheers.

@brianmhunt
Copy link
Author

It looks like support for HTML is in config.js. Here's a possible Pug definition:

  PugTemplate: {
    word: /[$0-9a-zA-Z_-]+/,
    regexes: [
      /^\s*{word}\#{word}(\s|\(|$|\.)/
      //^^ presumes ^ is beginning of a line (not the file)
    ],
    files: ['*.pug'],
    dependencies: ['JavaScript', 'CoffeeScript', 'TypeScript']
          /* Not sure what these are for ^^^  */
  }

Some examples of valid pug:

template#id
template#id_2(attribute=xyz)
   template#id_3
custom-tag#id-with-dash
template#id_with_class.some-class

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant