1. The "when" is wrong here; he heard sometime or other, and when they came into his neighborhood, he attacked them; see chapter 33:40.
13-15. Verses 14, 15 alone present any question. I see no reason why they could not have been written at the time, but my impression is that these two were added when the book was edited. This it surely was, traditionally by Ezra. It may have been by Samuel, or even Jeremiah when found in the days of Josiah, but by divine prophetic care owned by Christ Himself.
These references to Jasher and the book of the wars of the Lord, or legendary songs occur several times. They are appeals to common history as recognizing an unexampled wonder, or some alleged right for which their own testimony or faith would not avail—thus Jephthah. It seems to me quite uncertain whether "Is not this written in the book of Jasher" (Joshua 10:1313And the sun stood still, and the moon stayed, until the people had avenged themselves upon their enemies. Is not this written in the book of Jasher? So the sun stood still in the midst of heaven, and hasted not to go down about a whole day. (Joshua 10:13)) is by the author of the book of Joshua. It may be prophetically inserted as a witness to the truth of the account, as a phenomenon patent to all. It may have been a series of received history, a compilation so called, containing a notable number of passages in their history, compiled and added to at various times, just as I avow I do not know the date of the phrase in the book of Joshua. It is added as confirmation, and no change of what was originally written. It is even a question with me if the previous part of the verse be from Joshua. 2 Sam. 1:18,18(Also he bade them teach the children of Judah the use of the bow: behold, it is written in the book of Jasher.) (2 Samuel 1:18) clearly comes in parenthetically, whatever its source.