dash icon indicating copy to clipboard operation
dash copied to clipboard

Rehighlights dcc.Markdown when it is updated

Open leeagustin opened this issue 1 year ago • 1 comments

Fixes #2895.

The problem is that highlight.js was changed in https://github.com/highlightjs/highlight.js/commit/3987abe437dbf962d64a51da6282d9c9bc20fc13, which prevents re-highlighting an element.

The attribute data-highlighted="yes" flags an element as highlighted. Hence, the solution is to remove this attribute before the code is re-highlighted.

Contributor Checklist

  • [x] I have broken down my PR scope into the following TODO tasks
    • [x] Re-highlights dcc.Markdown after it is updated
  • [x] I have run the tests locally and they passed. (refer to testing section in contributing)
  • [x] I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • [ ] I have added entry in the CHANGELOG.md
  • [ ] If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • [ ] this GitHub #PR number updates the dash docs
    • [ ] here is the show and tell thread in Plotly Dash community

leeagustin avatar Jun 28 '24 22:06 leeagustin

@T4rk1n can you please have a look and let us know if we can merge?

gvwilson avatar Aug 22 '24 19:08 gvwilson