Giter Club home page Giter Club logo

Comments (11)

jonathanKingston avatar jonathanKingston commented on May 5, 2024

This isn't a problem the .html extensions are actually parsed and handled by handlebars and you shouldn't think of them as HTML. Take a look into the help docs and look up handlebars.js too.

from meteor.

ultranaut avatar ultranaut commented on May 5, 2024

Yeah, I finally parsed that out of the docs, they could definitely be clearer on that point, though even the script file that's throwing the error states on the first line that // XXX should allow <!-- --> comments at toplevel, so clearly the developers themselves recognize that there's at least some issue there. However, accepting that that's (mostly) working as intended, I'm not really sure that being limited to using only <head>, <body> and <template> tags as the top levels isn't a bigger issue, but possibly that's a different discussion.

from meteor.

jonathanKingston avatar jonathanKingston commented on May 5, 2024

I think it will change with time, personally I would have preferred it if handlebars required its own extension like .hb or something then people would do a context switch like you would with .coffeescript.

I think that might actually be regarding just HTML comments to be fair as doctypes don't have a trailing -->
For me also I think it would make sense to be able to change the template that is in the lib/ directory as like you say changing doctype and other things is important.

from meteor.

debergalis avatar debergalis commented on May 5, 2024

+1 we need better error handling on HTML parse errors.

The .html files aren't HTML documents, though. They hold HTML-style templates (like handlebars), plus magic <head> and <body> sections that get concatenated into the final HTML head and body.

from meteor.

jonathanKingston avatar jonathanKingston commented on May 5, 2024

Can we not call them .html.handlebars or .html.hb like .html.erb in rails?

from meteor.

badslug avatar badslug commented on May 5, 2024

It would be nice to allow the doctype declarations at the top of the file - my code editor will read the doctype and properly syntax and error highlight for different HTML versions based on doctype. (e.g. accepting or flagging as errors form input types based on HTML version.) So even if the parser just regex and removed the doctype (ignoring it) that would help with my workflow.

from meteor.

TaraRed avatar TaraRed commented on May 5, 2024

Is this issue still present? Are non-HTML5 doctypes still going to be relevant by the time Meteor hits 1.0?

from meteor.

avital avatar avital commented on May 5, 2024

Yup, we recently introduced an explicit error message if you try to put a doctype declaration in a template .html file.

from meteor.

realsnick avatar realsnick commented on May 5, 2024

can i setup meteor to run with doctype for html4? This is crucial as we plan to go to production with meteor within 3 weeks.

from meteor.

avital avatar avital commented on May 5, 2024

@isamuelson You can hack around this by changing the following file: app/lib/app.html.in

from meteor.

realsnick avatar realsnick commented on May 5, 2024

Yes, I managed to do that. Got blocked on angular js not support IE7. looking for fixing it now.

from meteor.

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.