Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Fix comment ordering #2743

Open FredKSchott opened 6 years ago

FredKSchott commented 6 years ago
    testName = 'copy over comments in a page with scripts';
    test(testName, async () => {
      setSources({
        'test.html': `
          <!-- First comment -->
          <script></script>
          <!-- Second comment -->
          <script>
            // comment in script
            console.log('second script');
          </script>
          <!-- Another comment -->
          <!-- Final trailing comment -->
        `
      });

      assertSources(await convert(), {
        'test.js': `
/* First comment */
;
// comment in script
/* Second comment */
console.log('second script');
/* Another comment */
/* Final trailing comment */
;
`,
      });
    });

@stramel correctly pointed out that // comment in script should appear under /* Second comment */.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.