13 Replies Latest reply on Jan 24, 2008 6:13 AM by Newsgroup_User

    dw reorganizes my code

    Level 7
      hi

      dw reorganizes my code, it merges several short lines into one long.

      i'd like sometimes short lines to remain short.

      how do i ?

      thanks

      lenny


        • 1. Re: dw reorganizes my code
          Level 7
          On Sat, 4 Aug 2007 12:33:13 +0200, "lenny" <its@not-mine.com> wrote:

          >hi
          >
          >dw reorganizes my code, it merges several short lines into one long.
          >
          >i'd like sometimes short lines to remain short.
          >
          >how do i ?
          >
          >thanks
          >
          >lenny
          >

          put

          code rewrite

          into the help system


          --

          ~Malcolm N....
          ~
          • 3. Re: dw reorganizes my code
            Level 7
            but there's no help there

            there's no way to tell it not to merge lines


            • 4. Re: dw reorganizes my code
              Level 7
              On Sat, 4 Aug 2007 23:03:26 +0200, "lenny" <its@not-mine.com> wrote:

              >but there's no help there
              >
              >there's no way to tell it not to merge lines
              >

              Yes there is - read F1 help again for "Code rewrite"
              Never Rewrite Code: In Files With Extensions


              Edit | Preferences |

              Code rewriting

              Never Rewrite Code: In Files With Extensions

              put in .htm .html


              --

              ~Malcolm N....
              ~
              • 5. Re: dw reorganizes my code
                Level 7
                i have it checked.
                and still it merges lines

                lenny





                "Malcolm N_" <malcom@mgnixon.org.uk> wrote in message
                news:tao9b3l5899qnej3emcs1p5khd8s27rb2t@4ax.com...
                > On Sat, 4 Aug 2007 23:03:26 +0200, "lenny" <its@not-mine.com> wrote:
                >
                >>but there's no help there
                >>
                >>there's no way to tell it not to merge lines
                >>
                >
                > Yes there is - read F1 help again for "Code rewrite"
                > Never Rewrite Code: In Files With Extensions
                >
                >
                > Edit | Preferences |
                >
                > Code rewriting
                >
                > Never Rewrite Code: In Files With Extensions
                >
                > put in .htm .html
                >
                >
                > --
                >
                > ~Malcolm N....
                > ~


                • 6. Re: dw reorganizes my code
                  Level 7


                  > i have it checked.
                  > and still it merges lines
                  >
                  > lenny

                  what are you doing when it merges the lines?
                  Is it when you first open the file?
                  run commands->format source code?
                  ??


                  --
                  Alan
                  Adobe Community Expert, dreamweaver

                  http://www.adobe.com/communities/experts/



                  • 7. Re: dw reorganizes my code
                    Level 7
                    On Sun, 5 Aug 2007 00:09:12 +0200, "lenny" <its@not-mine.com> wrote:

                    >i have it checked.
                    >and still it merges lines
                    >
                    >lenny
                    >
                    >
                    >
                    You have what checked ?

                    did you put your file extensions such as .htm into the box alongside
                    " Never Rewrite Code: In Files With Extensions"


                    Read the help files !!!!!


                    --

                    ~Malcolm N....
                    ~
                    • 8. Re: dw reorganizes my code
                      Level 7
                      >> You have what checked ?
                      >>
                      >> did you put your file extensions such as .htm into the box alongside
                      >> " Never Rewrite Code: In Files With Extensions"

                      yes i did.


                      >> Read the help files !!!!!

                      i read. it didn't prevent dw from merging the lines...


                      thanks

                      lenny


                      • 9. Re: dw reorganizes my code
                        Level 7
                        > what are you doing when it merges the lines?
                        > Is it when you first open the file?
                        > run commands->format source code?
                        > ??
                        >
                        >
                        > --
                        > Alan
                        > Adobe Community Expert, dreamweaver
                        >
                        > http://www.adobe.com/communities/experts/




                        no, i didn't run this command

                        lenny


                        • 10. Re: dw reorganizes my code
                          Level 7
                          >> what are you doing when it merges the lines?
                          >> Is it when you first open the file?
                          >> run commands->format source code?
                          >> ??
                          >>
                          >>
                          >> --
                          >> Alan
                          >> Adobe Community Expert, dreamweaver
                          >>
                          >> http://www.adobe.com/communities/experts/
                          >
                          >
                          >
                          >
                          > no, i didn't run this command
                          >
                          > lenny


                          WHEN is it that you think or know these lines of code are being merged?

                          Are these really distinct lines of code with hard line returns? and then you
                          do ~something~ or choose some menu option in dreamweaver that does
                          ~something~, and the hard line returns in the code are not there- fill in
                          the blanks for the missing steps please.

                          Please if possible, give me a short step by step by step example of what the
                          problem is.


                          --
                          Alan
                          Adobe Community Expert, dreamweaver

                          http://www.adobe.com/communities/experts/



                          • 11. Re: dw reorganizes my code
                            Barb
                            I'm having the same problem as Lenny (I think) where Dreamweaver is rewriting my code.

                            In my preferences, under "code rewriting", I have UNCHECKED every checkbox, so nothing should be rewritten. In the "never rewrite code" box, I have:
                            .as .asr .asc .asp .ascx .asmx .aspx .cfc .cfm .cfml .config .cs .ihtml .js .jsp .php .php3 .vb .xml .xsl .xslt .xul

                            Under URL encoding, I have "do not encode special characters selected".

                            Yet when upon opening certain files, it continues to rewrite my code! Here is an example:

                            <select name="sYearofbirth" >
                            <option value="">
                            <cfoutput>
                            <cfloop index="y" from="1989" to="1900" step="-1">
                            <option value=#y# <cfif qsurv.yearofbirth eq #y#> selected</cfif> >#y#
                            </cfloop>
                            </cfoutput>
                            </select>

                            is rewritten to:

                            <select name="sYearofbirth" >
                            <option value="">
                            <cfoutput>
                            <cfloop index="y" from="1989" to="1900" step="-1">
                            <option value=#y# <cfif qsurv.yearofbirth eq #y#> selected</cfif> >#y#
                            </cfoutput>
                            </cfloop>
                            </select>

                            which leads to an invalidly nested <cfloop> error.

                            I realize there may be things that DW doesn't like (no ending </option> tags or even code above this that it doesn't like, but the point is that I turned OFF code rewriting and it still does it every time I open the file!

                            I'm not 100% sure, but I think I started having this problem sometime before 1/8/08 and I don't know if it coincided with any updates.

                            I'm using DW CS3 on a Mac and I'm going nuts . . . any help would be greatly appreciated.
                            • 12. Re: dw reorganizes my code
                              Barb Level 1
                              Oh yeah, and the file that I am referring to is a .cfm file.
                              • 13. Re: dw reorganizes my code
                                Level 7
                                Barb wrote:
                                > I realize there may be things that DW doesn't like (no ending </option> tags
                                > or even code above this that it doesn't like, but the point is that I turned
                                > OFF code rewriting and it still does it every time I open the file!
                                >
                                > I'm using DW CS3 on a Mac and I'm going nuts . . .

                                The default DOCTYPE in CS3 is XHTML 1.0 Transitional, which doesn't
                                permit leaving out the ending </option> tag. If you want to use that
                                style of coding, change the DOCTYPE to HTML 4.01 Transitional. See if
                                that solves your problem.

                                --
                                David Powers, Adobe Community Expert
                                Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
                                Author, "PHP Solutions" (friends of ED)
                                http://foundationphp.com/