ralfstuckert / pdfbox-layout

MIT License
156 stars 74 forks source link

Underline and Strikethrough Markup on Same Text #40

Open rinatigati opened 7 years ago

rinatigati commented 7 years ago

I was wondering how would I go about adding underline and strikethrough to the same content by using the markup? Since the markup for underline and strikethrough is the same it seems like it parses the first "__" but then doesn't see the second one.

The same issue happens with italic and either one of those too because italic uses "_" and these use "__" for the markup.

I was thinking changing the annotation for some of these would fix this, but I'm not entirely sure how to do that.

Thanks!

ralfstuckert commented 7 years ago

Yep, the markup for underline was poorly chosen :-/

Since underline accepts parameters in curly braces, you may do this as a workaround to distinguish underline and italic:

"This is some __{:}_underlined italic__{:}_ text"