dart_to_js_script_rewriter icon indicating copy to clipboard operation
dart_to_js_script_rewriter copied to clipboard

transformer also transforms html files in lib

Open kasperpeulen opened this issue 9 years ago • 3 comments

The transformer also transforms html files in lib, this can give problems together with angular2 for example. It would be better I think if this would only transform files in web, and also only change the html if there is a match.

it now adds html/body tags to angular templates for example:

kasperpeulen avatar Dec 25 '15 01:12 kasperpeulen

Same problem here: too much work is done by the transformer.

I though that only the script tags would be rewritten but instead the complete markup is transformed for all HTML files in lib and web folders:

  • empty values are added to boolean attributes (async or download becomes async="" or download="")
  • HTML entities are converted to Unicode characters (– becomes -)
  • <html>, <head> and <body> tags are added to HTML fragments (e.g. partial views)

cedx avatar Dec 27 '15 23:12 cedx

Proposal:

  • Only touch files that have a dart script and are not in lib and leave the others as they are

kasperpeulen avatar Dec 27 '15 23:12 kasperpeulen

Fixed in e639fc27.

koorgoo avatar Nov 22 '16 18:11 koorgoo