{"action":"created","issue":{"url":"https://api.github.com/repos/vqmod/vqmod/issues/49","labels_url":"https://api.github.com/repos/vqmod/vqmod/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/vqmod/vqmod/issues/49/comments","events_url":"https://api.github.com/repos/vqmod/vqmod/issues/49/events","html_url":"https://github.com/vqmod/vqmod/issues/49","id":97269449,"number":49,"title":"Wrong replacements","user":{"login":"litecart","id":13398519,"avatar_url":"https://avatars.githubusercontent.com/u/13398519?v=3","gravatar_id":"","url":"https://api.github.com/users/litecart","html_url":"https://github.com/litecart","followers_url":"https://api.github.com/users/litecart/followers","following_url":"https://api.github.com/users/litecart/following{/other_user}","gists_url":"https://api.github.com/users/litecart/gists{/gist_id}","starred_url":"https://api.github.com/users/litecart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/litecart/subscriptions","organizations_url":"https://api.github.com/users/litecart/orgs","repos_url":"https://api.github.com/users/litecart/repos","events_url":"https://api.github.com/users/litecart/events{/privacy}","received_events_url":"https://api.github.com/users/litecart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-26T00:21:48Z","updated_at":"2015-07-26T00:27:40Z","closed_at":null,"body":"I am getting wrong replacements and I would like to know if this is a bug.\r\n\r\nThis is the operation:\r\n\r\n```\r\n\t\t<operation error=\"log\">\r\n\t\t\t<search position=\"after\"><![CDATA[\r\n        'status',\r\n      ]]></search>\r\n\t\t\t<add><![CDATA[\r\n        'preorderable',\r\n      ]]></add>\r\n\t\t</operation>\r\n```\r\n\r\nThis is part of the source code, getting a successful match and replament:\r\n\r\n```\r\n      $fields = array(\r\n        'manufacturer_id',\r\n        'supplier_id',\r\n        'delivery_status_id',\r\n        'sold_out_status_id',\r\n        'default_category_id',\r\n        'categories',\r\n        'product_groups',\r\n        'status',\r\n        'date_valid_from',\r\n        'date_valid_to',\r\n        'quantity',\r\n        'quantity_unit_id',\r\n        'purchase_price',\r\n        'prices',\r\n        'campaigns',\r\n        'tax_class_id',\r\n        'code',\r\n        'sku',\r\n        'upc',\r\n        'taric',\r\n        'dim_x',\r\n        'dim_y',\r\n        'dim_z',\r\n        'dim_class',\r\n        'weight',\r\n        'weight_class',\r\n        'name',\r\n        'short_description',\r\n        'description',\r\n        'keywords',\r\n        'head_title',\r\n        'meta_description',\r\n        'attributes',\r\n        'images',\r\n        'options',\r\n        'options_stock',\r\n      );\r\n```\r\n\r\nHere is another place in the sourcecode it should not match, but does:\r\n\r\n```\r\n          <tr>\r\n            <td><strong><?php echo language::translate('title_status', 'Status'); ?></strong><br />\r\n              <label><?php echo functions::form_draw_checkbox('status', '1', true); ?> <?php echo language::translate('title_published', 'Published'); ?></label></td>\r\n          </tr>\r\n```\r\nThis is the result:\r\n\r\n```\r\n      $fields = array(\r\n        'manufacturer_id',\r\n        'supplier_id',\r\n        'delivery_status_id',\r\n        'sold_out_status_id',\r\n        'default_category_id',\r\n        'categories',\r\n        'product_groups',\r\n        'status',\r\n\r\n        'preorderable',\r\n      \r\n        'date_valid_from',\r\n        'date_valid_to',\r\n        'quantity',\r\n        'quantity_unit_id',\r\n        'purchase_price',\r\n        'prices',\r\n        'campaigns',\r\n        'tax_class_id',\r\n        'code',\r\n        'sku',\r\n        'upc',\r\n        'taric',\r\n        'dim_x',\r\n        'dim_y',\r\n        'dim_z',\r\n        'dim_class',\r\n        'weight',\r\n        'weight_class',\r\n        'name',\r\n        'short_description',\r\n        'description',\r\n        'keywords',\r\n        'head_title',\r\n        'meta_description',\r\n        'attributes',\r\n        'images',\r\n        'options',\r\n        'options_stock',\r\n      );\r\n```\r\n\r\n```\r\n          <tr>\r\n            <td><strong><?php echo language::translate('title_status', 'Status'); ?></strong><br />\r\n              <label><?php echo functions::form_draw_checkbox('status', '1', true); ?> <?php echo language::translate('title_published', 'Published'); ?></label></td>\r\n\r\n        'preorderable',\r\n      \r\n          </tr>\r\n```\r\n\r\nDoes position after do partial inline matches?"},"comment":{"url":"https://api.github.com/repos/vqmod/vqmod/issues/comments/124920662","html_url":"https://github.com/vqmod/vqmod/issues/49#issuecomment-124920662","issue_url":"https://api.github.com/repos/vqmod/vqmod/issues/49","id":124920662,"user":{"login":"JAY6390","id":696920,"avatar_url":"https://avatars.githubusercontent.com/u/696920?v=3","gravatar_id":"","url":"https://api.github.com/users/JAY6390","html_url":"https://github.com/JAY6390","followers_url":"https://api.github.com/users/JAY6390/followers","following_url":"https://api.github.com/users/JAY6390/following{/other_user}","gists_url":"https://api.github.com/users/JAY6390/gists{/gist_id}","starred_url":"https://api.github.com/users/JAY6390/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JAY6390/subscriptions","organizations_url":"https://api.github.com/users/JAY6390/orgs","repos_url":"https://api.github.com/users/JAY6390/repos","events_url":"https://api.github.com/users/JAY6390/events{/privacy}","received_events_url":"https://api.github.com/users/JAY6390/received_events","type":"User","site_admin":false},"created_at":"2015-07-26T00:27:40Z","updated_at":"2015-07-26T00:27:40Z","body":"As for partial, as per the scripting description\r\n\r\n> The `<search>` tag can only be a single line, though doesn't have to be a whole line, as partial matches work too. You should learn how to use the offset attribute to properly encompass all needed lines, but that doesn't mean you should encompass many lines. Instead of trying to include many lines from top down, try starting at the bottom and finding lines going up."}}