Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Updated bbcode.js #189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Amaterasu27
Copy link
Contributor

In PM, if you have some message with the [ code ] tag, it will break all the [ spoilers ] tags and they won't open when clicking on "Show spoiler"
This problem is because of the first line of the function I deleted
If the code find any 'pre.bbcode_code_body', it breaks the whole code, messing spoiler and youtube tags

In PM, if you have some message with the [ code ] tag, it will break all the [ spoilers ] tags and they won't open when clicking on "Show spoiler"
This problem is because of the first line of the function I deleted
If the code find any 'pre.bbcode_code_body', it breaks the whole code, messing spoiler and youtube tags
@dloser
Copy link
Contributor

dloser commented Mar 5, 2016

To be a bit more specific: highlight.js is no longer included in extra_XXX.js, but there is still a hljs reference in the file. A [code] block in the source results in evaluation of hljs, which fails and stops the rest of the code from executing, breaking spoiler tags, but also previews and more.

@lwward
Copy link
Member

lwward commented Jul 5, 2016

A better solution would be to check if hljs is defined within the each loop - or to include highlight.js as @dloser suggests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants