I am writing code in javascript that will be exported to html. My issue is that my variables contain strings that must be partially bolded, however the language of the string is a right-to-left language (Hebrew), so when I try to put in the "" or "" in the string, it moves the text and does not bold the right words. For example, I need to create:
**זה **מבחן and **זה **עוד מבחן
var test = ["זה <b>מבחן<b>, "<b>זה עוד<b> מבחן"]
but my html output in html becomes: זהמבחן and **עוד מבחן **זה. It is also not possible to just simply reverse the bolding, because this does not work.
How can I properly bold parts of right-to-left text in the strings of a javascript variable so the html output follows the proper bolding pattern?