Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2375

Excessive <br>'s in generated HTML

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.9.1
    • 0.9.2
    • HTML - Compiler
    • None
    • Patch Available

    Description

      This was working "right" (at least how I thought it should work) back in 0.9.0 going back at least to 0.7.0 and introduced in 0.9.1
      https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=commit;h=63e3c63

      The issue is that there is a '<br>' in HTML after every newline in the source comment (thrift). I assume that this was not the intention of the THRIFT-1800 change.

      I will attach complete sample thrift files and html output, but here is a summary:

      This is what the output USED to look like

      <tr><td>1</td><td>theThing</td><td><code>i32</code></td><td>Some comments can go for quite a while and may span multiple
      lines. What looks like a good spot to break a line in the
      thrift file may turn out to be not so great in HTML. In
      fact in HTML we should let the browser decide when to start
      a new lines. Users can still
      insert a break<br> when they really need/want it
      </td><td>required</td><td></td></tr>
      </table><br/></div></div></body></html>

      And this is what it looks like today

      <tr><td>1</td><td>theThing</td><td><code>i32</code></td><td>Some comments can go for quite a while and may span multiple<br/>lines. What looks like a good spot to break a li
      ne in the<br/>thrift file may turn out to be not so great in HTML. In<br/>fact in HTML we should let the browser decide when to start<br/>a new lines. Users can still<br/>
      insert a break<br> when they really need/want it<br/></td><td>required</td><td></td></tr>
      </table><br/></div></div></body></html>

      Attachments

        1. thrift-2375-testcase.thrift
          2 kB
          Jens Geyer
        2. thrift-2375-href-testcase2.thrift
          0.2 kB
          Nevo Hed
        3. thrift-2375-excessive-BRs-in-HTML-v3.patch
          7 kB
          Jens Geyer
        4. THRIFT-2375.thrift
          0.4 kB
          Nevo Hed
        5. THRIFT-2375_master.png
          39 kB
          Nevo Hed
        6. THRIFT-2375_090.png
          37 kB
          Nevo Hed
        7. out_master.html
          1 kB
          Nevo Hed
        8. out_090.html
          1 kB
          Nevo Hed

        Activity

          People

            jensg Jens Geyer
            nhed Nevo Hed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: