Skip to content

Syntax highlighting broken alongside 1Password extension #1784

@amadeann

Description

@amadeann

Hi there,

Code samples in the docs miss syntax highlighting when I have 1password extensions in MS Edge on Windows 11 enabled. Here's how it looks with 1password enabled:

Image

I'm getting the following console error. This error is there both with 1password disabled and enabled, so it appears to be coming directly from Statamic docs, not the extension. I.e. the JS in the docs seems to be broken. Visually, without browser extensions like 1password enabled that bug doesn't break the site. However, that bug in JS trips up the browser extensions somehow, which then breaks the layout.

site-BExdU4Eu.js:6  Uncaught TypeError: Cannot redefine property: $persist
    at Object.defineProperty (<anonymous>)
    at E (site-BExdU4Eu.js:6:51173)
    at site-BExdU4Eu.js:6:15375
    at Array.forEach (<anonymous>)
    at Object.au [as plugin] (site-BExdU4Eu.js:6:15364)
    at Object.md [as start] (site-BExdU4Eu.js:86:8003)
    at HTMLDocument.<anonymous> (site-BExdU4Eu.js:87:9955)

When I dig into console errors, it appears to be coming somehow from "persist" alpine plugin seems to be loaded twice:

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions