Giter Site home page Giter Site logo

Allow HTML files about leasot HOT 10 CLOSED

pgilad avatar pgilad commented on July 19, 2024
Allow HTML files

from leasot.

Comments (10)

binarykitchen avatar binarykitchen commented on July 19, 2024

Moved in here from pgilad/gulp-todo#38

from leasot.

pgilad avatar pgilad commented on July 19, 2024

Html files have 3 possible comment types in them:

  • html
  • js
  • css

I'm contemplating if it's worth to try to juggle those comments in a multi-filetype sort of file (such as html).

On the other hand, if it's just js comments inside an html file, you can force the filetype in the cli with the option --filetype or using the programmatic extension option in https://github.com/pgilad/leasot#parseextension-contents-filename-customtags

from leasot.

binarykitchen avatar binarykitchen commented on July 19, 2024

Hmm, forcing the filetype? I could but this makes things complicated because I am using gulp-todo here and do not want to be reminded about the filetype.

from leasot.

binarykitchen avatar binarykitchen commented on July 19, 2024

hello?

from leasot.

pgilad avatar pgilad commented on July 19, 2024

Sorry, been kind of busy. I would just add an HTML file support and support html, js and css style comments... PR is definitely welcome!

from leasot.

binarykitchen avatar binarykitchen commented on July 19, 2024

just wanted to check - i am very busy either but would welcome such a change ...

from leasot.

dkebler avatar dkebler commented on July 19, 2024

Was kinda wondering why leasot did support html out of the box being ubiquitous file format. Go templates use html files so need it for more than just straight html.

Bit of a JS noob but I can try putting together a PR. Should be as easy as copying a another similar parser and making a few changes no?

As to where to put it
html comments should be added to default.parser don't you think?? instead of separate file.

from leasot.

dkebler avatar dkebler commented on July 19, 2024

Ah, default parser won't work that just for / and the like, but I think I can just add htm, htm extensions to existing twig parser as that's the same syntax.

from leasot.

dkebler avatar dkebler commented on July 19, 2024

That was too easy. PR has been made although I have some error in parser-spec that I don't understand how to fix (very nooby at test assertions, don't know much about mocha).

from leasot.

pgilad avatar pgilad commented on July 19, 2024

Closed via #32

from leasot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.