Closed icylace closed 10 years ago
They are uppercase so they are unlikely to conflict with local variable names, the tag list is fairly long:
["A","ABBR","ACRONYM","ADDRESS","AREA","ARTICLE","ASIDE","AUDIO","B","BDI","BDO","BIG","BLOCKQUOTE","BODY","BR","BUTTON","CANVAS","CAPTION","CITE","CODE","COL","COLGROUP","COMMAND","DATALIST","DD","DEL","DETAILS","DFN","DIV","DL","DT","EM","EMBED","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAME","FRAMESET","H1","H2","H3","H4","H5","H6","HEAD","HEADER","HGROUP","HR","HTML","I","IFRAME","IMG","INPUT","INS","KBD","KEYGEN","LABEL","LEGEND","LI","LINK","MAP","MARK","META","METER","NAV","NOSCRIPT","OBJECT","OL","OPTGROUP","OPTION","OUTPUT","P","PARAM","PRE","PROGRESS","Q","RP","RT","RUBY","SAMP","SCRIPT","SECTION","SELECT","SMALL","SOURCE","SPAN","SPLIT","STRONG","STYLE","SUB","SUMMARY","SUP","TABLE","TBODY","TD","TEXTAREA","TFOOT","TH","THEAD","TIME","TITLE","TR","TRACK","TT","UL","VAR","VIDEO","WBR"],
So there'd be a good chance of a local variable name collision somewhere along the line... Better safe than sorry!
Uppercase also stands out a little more - lowercase tends to blend into the code a little...
I'll have to disagree but I appreciate your reasoning.
How about adding an option to do it? Maybe a person like me could add something like:
m.sugarTags.setup({ case: 'lowercase' });
to the initialization phase of their code.
A setup method also leaves the door open for adding features in a sensible way (e.g. activating SVG tags when they're needed).
Yes, that sounds reasonable, I'll add a feature for that
Thanks !
Ok I've added the ability - do:
with(m.sugarTags.lower()){ ...
To use it.
Thanks !
Why are the sugartags all uppercase? I think they should be lowercase because: