Giter Site home page Giter Site logo

Markaby compat about camping HOT 14 CLOSED

camping avatar camping commented on June 12, 2024
Markaby compat

from camping.

Comments (14)

judofyr avatar judofyr commented on June 12, 2024
  • text "You & Me" is now escaped
  • There's no xhtml_strict
  • helpers is missing

from camping.

judofyr avatar judofyr commented on June 12, 2024

input({name:1}, {value:2}) is not supported

from camping.

DaveEveritt avatar DaveEveritt commented on June 12, 2024

is xhtml_strict still necessary, now the standard is no longer being developed? HTML5 for me.

from camping.

judofyr avatar judofyr commented on June 12, 2024

I think we'll do a:

def xhtml_strict(*a,&b)
  warn "xhtml_strict is no longer supported (or an active standard); using HTML5 instead"
  html(*a,&b)
end

from camping.

DaveEveritt avatar DaveEveritt commented on June 12, 2024

I think as brief as possible - "xhtml_strict is no longer a supported standard; using HTML5 instead". Worth bearing in mind that although "HTML 5 includes an XML serialization known as XHTML 5" XTML 5 will still have the IE mime-type issue, so I reckon it's safer to force HTML5 and wait to see if XHTML 5 gets taken up by developers.

from camping.

judofyr avatar judofyr commented on June 12, 2024

Alright:

  • I haven't changed text; I think it's better to default to escaping
  • xhtml_strict and friends are now defined
  • input({name:1}, {value:2}) should now work in Mab-master
  • html will now also output a doctype.

BTW, should html in Mab default to outputting the doctype, or only Camping::Mab? /cc @Bluebie

from camping.

Bluebie avatar Bluebie commented on June 12, 2024

As far as I've been able to tell, xhtml 5 is only for compat with things like builder - letting you output xml-syntax and having browsers be okay with that. I haven't heard of it adding any extra functionality, and the whatwg were recommending in the standards that you use html syntax if you can, so I think supporting it would be a waste of time and a mistake if we have reliable html syntax output.

I agree about text being escaped so long as we add a warn to gem installation for the next version. Maybe a nice way to get around the escaping issue would be to provide an extra meaning for #html - if you call it with a string, it returns that string augmented with a little notice to Mab, asking it not to be escaped. Then you could do things like a(html("<b>bold link</b>"), :href => FancyController)

I feel like html should emit a doctype. I struggle to think of any situations where you wouldn't want a doctype, in camping or otherwise, so my feeling is that Mab aught to do that.

from camping.

paulvt avatar paulvt commented on June 12, 2024

Well, I agree that there is almost no situation where you wouldn't want a doctype, it is still inconsitent for one method call to generate two elements in a sense. It is a surprise. Besides that, I have used other markup DSLs (HAML, etc.) and they all have a separate thing for doctypes (e.g. HAML).

from camping.

Bluebie avatar Bluebie commented on June 12, 2024

I like your thoughts on The Least Surprised. Still, it seems like it maybe a delightful surprise! Tradition seems like an uninteresting reason to do something.

from camping.

paulvt avatar paulvt commented on June 12, 2024

Except that I am just porting Camping 2.0-code and now suddenly, unexpectedly have 2 doctypes. :)

from camping.

judofyr avatar judofyr commented on June 12, 2024

I like your thoughts on The Least Surprised.

Don't we all?

Except that I am just porting Camping 2.0-code and now suddenly, unexpectedly have 2 doctypes. :)

This is only a bug on Mab-master + Camping-prerelase. Markaby didn't have a doctype method at all (I've never seen anyone use it at least), so I think automatic doctype is useful…

from camping.

Bluebie avatar Bluebie commented on June 12, 2024

Yup. On more complex websites (like mine!) a browser will see a page with no doctype as a 90's era page, and go in to compatibility mode, which will ruin all my CSS and Javascript! Two doctypes probably wouldn't break anything though! :)

from camping.

DaveEveritt avatar DaveEveritt commented on June 12, 2024

@judofyr LOL The Least Surprised...

from camping.

karloscarweber avatar karloscarweber commented on June 12, 2024

I'm going to close this issue as It's become unnecessary. mab which has replaced markably is html5 by default already.

from camping.

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.