This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/pretty-text
Martin Brennan 0b8d0a14d7
DEV: Add markdown_additional_options to Site (#15738)
Sometimes plugins need to have additional data or options available
when rendering custom markdown features/rules that are not available
on the default opts.discourse object. These additional options should
be namespaced to the plugin adding them.

```
Site.markdown_additional_options["chat"] = { limited_pretty_text_markdown_rules: [] }
```

These are passed down to markdown rules on opts.discourse.additionalOptions.

The main motivation for adding this is the chat plugin, which currently stores
chat_pretty_text_features and chat_pretty_text_markdown_rules on
the Site object via additions to the serializer, and the Site object is
not accessible to import via markdown rules (either through
Site.current() or through container.lookup). So, to have this working
for both front + backend code, we need to attach these additional options
from the Site object onto the markdown options object.
2022-01-28 13:02:02 +10:00
..
addon DEV: Add markdown_additional_options to Site (#15738) 2022-01-28 13:02:02 +10:00
app DEV: Move pretty-text into an ember-addon format (#9689) 2020-05-07 12:37:47 -04:00
config DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
engines/discourse-markdown FIX: possible ReDOS in markdown newline rule (#15646) 2022-01-20 22:32:01 +01:00
vendor DEV: Ember Addon needs a vendor dir 2020-05-07 15:45:35 -04:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
index.js REFACTOR: Support bundling our admin section as an ember addon 2020-09-22 15:14:29 -04:00
package.json DEV: Re-allow node 17, with a warning (#15083) 2021-11-24 21:16:33 +01:00