Strip // in front of <include> for single-line JS comments
We've previously relied on almost all code in Chromium to start with a license header, and therefore placing <include> behind single-line JS comments, as in: // <include src="blah.js"> Harmlessly expands to: // // Copyright the Chromium Authors But this is not always the case, and is kind of a hack. So instead, detect the case of "// " in front of a <include> and remove it. So that same "// <include" becomes: // Copyright the Chromium Authors or in the case that the file doesn't have a copyright, the first line of source code (like in dom_distiller). Sure, it adds more magic to the system, but it's probably fine. R=dpapad@chromium.org Fixed: 1021374 Change-Id: Ie7dbf9607c0a78caa20d0e60662efc9d81f88f39 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1898870Reviewed-by:Demetrios Papadopoulos <dpapad@chromium.org> Reviewed-by:
Lei Zhang <thestig@chromium.org> Commit-Queue: Dan Beam <dbeam@chromium.org> Cr-Commit-Position: refs/heads/master@{#712725}
Showing
Please register or sign in to comment