Skip to content

Fix stubbing attributes alongside cache_markdown_field

What does this MR do?

Regenerates the HTML for markdown fields if there is text in the markdown field and a blank string in the corresponding HTML field.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Previously, we'd only regenerate the HTML if the html field was nil. This turned out to break some specs when stubbing the relevant text fields, e.g., https://gitlab.com/gitlab-org/gitlab-ce/issues/34698#note_34263270

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #34698 (closed)

Merge request reports