Repository navigation
[Superseded] Restore BBCode compatibility with current Discourse - #151
Mondrethos wants to merge 1 commit into
Conversation
|
|
||
| /** | ||
| * @param {MouseEvent} ev | ||
| * @param {Slide} slide |
There was a problem hiding this comment.
I think we lose animation by relying on native behavior?
| */ | ||
| import { withPluginApi } from "discourse/lib/plugin-api"; | ||
|
|
||
| /** |
There was a problem hiding this comment.
why are we storing the slide?
| import { withPluginApi } from "discourse/lib/plugin-api"; | ||
| /* global bbscriptParser */ | ||
|
|
||
| /** |
There was a problem hiding this comment.
why are we storing which posts are decorated?
|
|
||
| /** | ||
| * Check if the post is a preview. If it is a preview, debounce the function | ||
| * @param {HTMLElement} post |
There was a problem hiding this comment.
what events do we need to abort?
| const pendingDecorations = new WeakMap(); | ||
| const scrollableOverflow = new Set(["auto", "scroll"]); | ||
|
|
||
| export function decorateBBCodeScrollers(post) { |
|
|
||
| // XenForo's [*] is an item separator, not a paired BBCode tag. Split only | ||
| // strings here so nested lists and formatting nodes stay inside their item. | ||
| export const list = (node, options) => { |
There was a problem hiding this comment.
why? i thought we agreed we're ditching xf lists and using discourse lists?
| import { preprocessAttr, toNode, toRawTag } from "../utils/common"; | ||
|
|
||
| // These are the variants supported by RpNation's XenForo table stylesheet. | ||
| const TABLE_STYLE = /^(?:(?:none|dotted|dark)(?:-zebra2?)?|zebra2?)$/; |
There was a problem hiding this comment.
i thought we agreed we're using discourse tables?
| raw = raw.replaceAll(uuid, content); | ||
| // These examples bypass Markdown's text renderer while hoisted. Escape | ||
| // them when restoring them, so HTML examples stay text inside code/plain. | ||
| const escaped = content |
There was a problem hiding this comment.
discourse has valid html elements that gets rendered directly, like <details> and <!-- --> comments
| // any closing tag. Long, historically valid XenForo layouts can therefore | ||
| // disappear entirely. Use its tokenizer extension to close missing children | ||
| // before their ancestor, and finish every remaining wrapper at EOF. | ||
| export function createLegacyTokenizer(input, options) { |
There was a problem hiding this comment.
WE NEED TO STOP SUPPORTING THIS. this is causing the current RTE nightmare in xenforo
| "@bbob/types" "*" | ||
|
|
||
| "@bbob/parser@*": | ||
| "@bbob/parser@*", "@bbob/parser@4.2.0": |
|
this PR needs to be broken down into multiple PRs with individual focuses. |
Previously, this PR combined CI maintenance, admin updates, Markdown integration, disclosure behavior, BBScript cleanup, and layout fixes in one review.
This work is superseded by independent PRs for standard CI, admin refresh, Markdown integration, disclosures, BBScript cleanup, and layouts, all targeting
mainand sharing the same CI maintenance so no feature PR requires another feature PR to merge first.