Zet-Web / zen-coding

Automatically exported from code.google.com/p/zen-coding
0 stars 0 forks source link

Request: setting to switch between XHTML and HTML selfclosing elements #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On line 330 of zen_core.py, self-closing tags are hard-coded to include a space 
and backslash.  
However, this is not appropriate for standard HTML, and some people prefer not 
to use a space 
before their backspace.

I would appreciate it if you added a setting that scripts could adjust.  For 
instance, 
selfclosing_string at the top of zen_core.py.  Then whatever is implementing 
zen could do this if 
they wanted to use standard HTML instead of XHTML:

from zencoding import zen_core

zen_core.selfclosing_string = ''

I've made this change in the attached file, if you would like to integrate it 
as proposed.

Ian

Original issue reported on code.google.com by georgeth...@gmail.com on 27 May 2009 at 3:57

Attachments:

GoogleCodeExporter commented 9 years ago
I'll think about it. IMO, the most suitable solution to this problem is to add 
'profiles' for xHTML that will describe 
output. For example: tag name case (uppercase/lowercase), attribute name case, 
omit closing tag, etc

Original comment by serge....@gmail.com on 28 May 2009 at 8:45

GoogleCodeExporter commented 9 years ago
I would love to see something a bit more powerful and flexible than the code I 
submitted.  As long as zen-
coding gives the script or app wrapping it a way to specify options like the 
self-closing string on the fly, I'll be 
happy.  :-)

Ian

Original comment by georgeth...@gmail.com on 29 May 2009 at 4:00

GoogleCodeExporter commented 9 years ago
Working on profiles

Original comment by serge....@gmail.com on 11 Jun 2009 at 8:11

GoogleCodeExporter commented 9 years ago
I've added experimental support for custom variables (like 'language') and 
profiles for generating output. You 
can check them out from my private branch:
http://code.google.com/p/zen-coding/source/browse/#svn/branches/serge.che/python
/zencoding

Some brief info about profiles:ZenCodingAPI on Wiki

Original comment by serge....@gmail.com on 18 Jun 2009 at 10:56

GoogleCodeExporter commented 9 years ago
See previous comment

Original comment by serge....@gmail.com on 30 Jun 2009 at 4:52