Commit Graph

12 Commits

Author SHA1 Message Date
Jarek Radosz 711cd7c85d DEV: Add to-markdown decorator functions (#16943)
To be used in discourse-spoiler-alert
2022-05-31 11:06:41 +02:00
Jarek Radosz d065ec0f7b FIX: Correctly handle nested quotes in to-markdown (#16938)
Given this html:

```
<aside class="quote no-group">
  <blockquote>
    <aside class="quote no-group">
      <blockquote>
        <p dir="ltr">test</p>
      </blockquote>
    </aside>
    <p dir="ltr">test2</p>
  </blockquote>
</aside>
```

The result was an invalid markdown:

```
[quote]
[quote]
> test
> [/quote]
>
>
>
> test2
[/quote]
```

Now the result is:

```
[quote]
[quote]
test
[/quote]

test2
[/quote]
```
2022-05-27 22:05:43 +02:00
Natalie Tay 4c46c7e334 DEV: Remove xlink hrefs (#15059) 2021-11-25 15:22:43 +11:00
Jarek Radosz d162229758 DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
Arpit Jalan 85c4e8fd32 FEATURE: support mark tag (#12088)
This commit adds support for `mark` tag for highlighting text content.
2021-02-15 21:47:30 +05:30
Roman Rizzi bbe5d8d5cf DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
Martin Brennan 2348a7972e FIX: When quoting an attachment, keep the |attachment in markdown (#11347) 2020-11-25 15:31:14 +11:00
Krzysztof Kotlarek 9bfce1a8dd FIX: trim no-break space in to-markdown (#11130)
No-break spaces were the reason for double spaces when pasting text to the composer.

https://meta.discourse.org/t/extra-spaces-added-to-markdown-with-rich-text-pasted/112769
2020-11-06 09:36:36 +11:00
Jarek Radosz 1b52cdedb1 DEV: Move more tests into modules (#11119)
Models, services, mixins, utilities, and most of the controllers
2020-11-05 20:23:28 +01:00
Jarek Radosz a17d54d0bf DEV: De-arrowify tests (#11068)
Using arrow functions changes `this` context, which is undesired in tests, e.g. it makes it impossible to setup things like pretender (`this.server`) in `beforeEach` hooks.

Ember guides always use classic functions in examples (e.g. https://guides.emberjs.com/release/testing/test-types/), and that's what it uses in its own test suite, as do various addons and ember apps.

It was also already used in Discourse where `this` was required. Moving forward, it will be needed in more places as we migrate toward ember-cli.

(I might later add a custom rule to eslint-discourse-ember to enforce this)
2020-10-30 17:37:32 +01:00
Robin Ward 71d37953d5 REFACTOR: Import QUnit and related helpers rather than globals
We used many global functions to handle tests when they should be
imported like other libraries in our application. This also gets us
closer to the way Ember CLI prefers our tests to be laid out.
2020-10-07 11:50:49 -04:00
Robin Ward 23f24bfb51 REFACTOR: Move javascript tests inside discourse app
This is where they should be as far as ember is concerned. Note this is
a huge commit and we should be really careful everything continues to
work properly.
2020-10-02 11:29:36 -04:00