gregturn / asciidoctor-packt

Backend and theme to convert Asciidoctor files into Packt Publishing OpenOffice doc
http://greglturnquist.com/category/learning-spring-boot
46 stars 13 forks source link

Update keyword styling #12

Closed gregturn closed 10 years ago

gregturn commented 10 years ago

This contains the proper style. The problem is, when applied to:

If you'll notice, all lines of that bullet list are tagged **Bullet [PACKT]**, except the last. It's tagged
**Bullet End [PACKT]**.

...it renders:

<text:p text:style-name="Normal_20__5b_PACKT_5d_">If you’ll notice, all lines of that bullet 
list are tagged <text:span text:style="Key_20_Word_205b_PACKT_5d_">Bullet [PACKT]</text:span>, 
except the last. It’s tagged <text:span text:style="Key_20_Word_205b_PACKT_5d_">Bullet 
End [PACKT]</text:span>.</text:p>

The double-underscore is trimmed out for some reason.

In another situation, it doesn't do that.

The output will be compacted XML (FODT), so it will be **hard** to read. That why running it through
`xmllint` is handy.

renders

      <text:p text:style-name="Normal_20__5b_PACKT_5d_">The output will be compacted XML 
(FODT), so it will be <text:span text:style="Key_20_Word_20__5b_PACKT_5d_">hard</text:span> 
to read. That why running it through xmllint is handy.</text:p>
gregturn commented 10 years ago

It appears that it likes to convert the double-underscore found inside the style name into an inline emphasis token. I'm not sure how to intercept or override this.

gregturn commented 10 years ago

By moving case :emphasis to the bottom, things now format properly!