-
2. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
ethayer777 Dec 11, 2012 10:18 AM (in response to sudarshan.t)thanks, this works but I want blank line between my rules. that is more important
-
3. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
sudarshan.t Dec 11, 2012 10:25 AM (in response to ethayer777)Unfortunately, that is the way DW works. What you could do is file a bug report here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform - it definitely is a bug - for DW to repeat the line break between comments each time source formatting is applied.
In the meantime, leave 'Blank line between rules' enabled. Instead of applying source formatting to entire document if you change one bit of code in CSS, just make a selection of that code and Apply Source Formatting to Selection. That will get rid of the extra line between comments.
-ST
-
4. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
AllDayDevDec 11, 2012 11:42 AM (in response to ethayer777)
I tried but could not reproduce this problem. I can see how this could be pretty annoying, so we'd like to investigate further to understand why you're encountering this problem.
As as test, can I have you do the following?
1. Close all files.2. Go to File > New.
3. Select Blank Page, select HTML for the Page Type, then select HTML 5: 2-column fixed, select "Create New File" for the Layout CSS setting, and then click Create.
4. In the source code for the CSS file, note the many comments in the CSS.
5. Apply Source Formatting.
Does the extra line(s) get added after the comments like was happening with your files?
If not, then perhaps the cause has something to do with your specific files. If this is the case, I'd appreciate if you could send me one or more of these files.
If it's happening with the Dreamweaver sample CSS as well, then something is going on with your copy of Dreamweaver. Let me know if so, and we'll go from there to get it resolved.
-
5. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
sudarshan.t Dec 11, 2012 12:11 PM (in response to AllDayDev)Carey, I can confirm this is happening.
Repeat same 5 steps that you had mentioned. Only difference being go into DW Prefs > Code Format > Advanced Formatting [CSS], enable 'Blank line between rules' as I had posted in my Reply #1.
Now, each time you hit 'Apply Source Formatting' there is a new blank line that is created between rules. I think the algorithm doesn't check if a blank already exists, thereby adds one each time. In JS terms, conditional if else should work, which is not present at the moment
-ST
-
6. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
ethayer777 Dec 11, 2012 12:13 PM (in response to AllDayDev)Thanks Carey, but the issue is still hapening. I will contact Adobe about it
-
7. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
sudarshan.t Dec 11, 2012 12:16 PM (in response to ethayer777)Ethayer, Carey is an Adobe employee (as you can see near his profile picture) whom I had requested to intervene here. He will have it escalated to wherever concerned.
-
8. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
ethayer777 Dec 11, 2012 12:18 PM (in response to AllDayDev)Carey, can you reproduce the bug?
-
9. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
ethayer777 Dec 11, 2012 12:19 PM (in response to sudarshan.t)thanks, I just submitted the bug report
-
10. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
AllDayDevDec 12, 2012 4:55 PM (in response to ethayer777)
Thanks for submitting the bug report to the team. I am now able to reproduce the issue.
I've flagged the issue for investigation, but as of now I would not expect a quick fix back from the team since it would be a low priority issue.
This command (like all others) uses JavaScript to execute, so if you're familiar with JavaScript you might be able to modify it on your system to avoid this issue. This command runs from the file "Source Formatting.js" inside the Adobe Dreamweaver CS6\configuration\Commands folder.
-
11. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
sudarshan.t Dec 12, 2012 6:29 PM (in response to AllDayDev)Thanks, Carey.
I'm sure this will be fixed in the next major rollout?
-ST
-
12. Re: DW CS6 - How can I stop "Apply Source Formatting" from adding line breaks after my css comments?
ethayer777 Dec 21, 2012 7:51 AM (in response to AllDayDev)Thanks Carey. I compared the CS5 & CS6 Source Formatting.js files to see if there were differences and they are identical. Would you know how to modify this file to prevent something like this? I was going to try and copy the CS5 file over and see if that worked but since they are identical in code I didnt think it would help.
Happy Holidays!