Comments (14)
text "You & Me"
is now escaped- There's no
xhtml_strict
helpers
is missing
from camping.
input({name:1}, {value:2})
is not supported
from camping.
is xhtml_strict
still necessary, now the standard is no longer being developed? HTML5 for me.
from camping.
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.
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.
Alright:
- I haven't changed
text
; I think it's better to default to escaping xhtml_strict
and friends are now definedinput({name:1}, {value:2})
should now work in Mab-masterhtml
will now also output a doctype.
BTW, should html
in Mab default to outputting the doctype, or only Camping::Mab? /cc @Bluebie
from camping.
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.
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.
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.
Except that I am just porting Camping 2.0-code and now suddenly, unexpectedly have 2 doctypes. :)
from camping.
I like your thoughts on The Least Surprised.
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.
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.
@judofyr LOL The Least Surprised...
from camping.
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)
- Add Rack 3.0 Linter to Tests
- Officially support Windows again
- Write Tests for generator HOT 1
- Rename Master Branch to Main (Again) HOT 1
- Fix Reloader HOT 3
- Gem dependencies are not fully documented in the ReadMe HOT 11
- Camping Server isn't Properly Tested.
- Add simpler DSL support for straight up mapping requests to a camping app.
- Add Markaby back as a dependency
- Add RAKE task to release new gem
- Make passkeys the default authentication option HOT 2
- Getting error when trying out camping book section 02 on models HOT 1
- RubyGems page still lists camping.rubyforge.org as homepage HOT 5
- Sub directories in Apps won't let you redefine URLs without being sad
- Camping only looks for views in a views directory in the root, and shallowly, should look for views in each app too.
- does the IRC channel work? HOT 3
- unable to run camping HOT 3
- Ruby 3.3 support? HOT 4
- Receiving syntax errors when using camping HOT 2
- CI: Gemfile complains about platforms HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camping.