The idea is to simply count the number of chars $len(%genre%) and trim the corresponding white space chars to the right, so the right border aligns again.
Basically, you determine the length of the whole real string and then $repeat() a number of space characters in which you take the total position of the | and $sub() the length.