My mother Language is Persian and this is a problem for huge number of people who use Adobe's products, and when they had to have or type context with a mix of two languages with different writing systems. it could be annoying and waste time to correct and modify those texts.
Personally I type or import my Persian body text with a mix of two languages (one of them; RTL to LTR [in my case, Persian] and the other one; LTR to RTL (English or any Latin Languages). My Persian body text uses paragraph style(s) [one or more]. Then create character style(s) for those Latin texts that go between my Persian lines and text. I apply character style(s) to Latin text/languages and now they are correct as I wish and expect, even if they have similar texts like an extension with a point: .min.js or whatever like this.
Note that when we have an RTL language like Persian, it's naturally we use and create RTL styles and direction, but for Latin, languages are vice-versa. So we create character style(s) for in-line texts, you should choose "Left-to-Right option from "Character Direction" drop-menu of "Character Style Options" window.
If you have a few of these Latin language texts like the extension with points you mentioned, you can select those extensions (Latin texts) one by one by Text Tool [T] and apply your character style to them.
If you have many, use Find/Replace feature with more powerful options to find and apply your specific character style(s) that created for those specific Latin texts that are located between an RTL language.
In this way, you can find and replace those incorrect extensions or whatever with the correct ones you want.