#13345 closed defect (fixed)
doc parser breaks if module has "function" in any of the deps
Reported by: | dante | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | General | Version: | 1.7.0b1 |
Keywords: | mxpxpod | Cc: | |
Blocked By: | Blocking: |
Description
The regexp which matches deps and unwraps to AMD format is brittle, and breaks when it encounters the word "function".
$text = preg_replace_callback('/(define\((.*?)function(.*?)\{(.*)\}\);)/s', "_amd_pseudodoc_fix", $text, 1);
will accidentally stop on the first occurance of "function" in the list of deps:
define(["dojo", "dojox/lang/functional"], function(dojo, df){ });
becomes
;(function_al
in the unwrapp_fix callback. Need to fix regexp to match only the stuff in []'s.
Change History (4)
comment:1 Changed 10 years ago by
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
(In [25678]) refs #13345 - adding a test showing how this is broken, and attempting to fix