Skip to content

Tag Overrides Not Working for <code> #62

@chubbardbv

Description

@chubbardbv

I have 2 styles defined in Word that I want to use for code blocks and inline code and have defined them as tag overrides:

tag_overrides = {
  'code': 'Inline Code',
  'pre': 'Code Block'
}
parser = HtmlToDocx(tag_style_overrides=tag_overrides)

<pre> is correctly styled with the 'Code Block' word style, however, the <code> override seems to be ignored. What is rendered in place is Courier 10pt font (default) even though the 'Inline Code' style defines a different font, background color, and border. I have made sure that 'Inline Code' is a character style (not a paragraph style).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions