I have a piece of HTML code. Suppose it is like this (in fact it’s exactly like this — only the floats will defer):
<span class="price"><span class="woocommerce-Price-amount amount"><bdi>4.60 <span class="woocommerce-Price-currencySymbol">€</span></bdi></span> <span class="ohne-mwst-price-text">(<span class="woocommerce-Price-amount amount"><bdi>3.80 <span class="woocommerce-Price-currencySymbol">€</span></bdi></span> <small class="woocommerce-price-suffix">ohne MwSt</small>)</span></span>
I would like to find the shortest/smartest way to catch the two floats, multiply them both with the same integer (a quantity), and put those two sums in place of the floats.
I can do some regex and struggle with 20-30 lines of JS to make it work. What I’m asking here is the smart 5-6 lines to solve this, as I’m sure there is such a way.
Any help will be much appreciated.