markup.spec.ts 569 B

1234567891011121314
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { markup } from '../markup.ts'
  3. it('markup creates correct html', () => {
  4. expect(markup('||italic||')).toBe('<i>italic</i>')
  5. expect(markup('|bold|')).toBe('<b>bold</b>')
  6. expect(markup('_underline_')).toBe('<u>underline</u>')
  7. expect(markup('//strikethrough//')).toBe('<del>strikethrough</del>')
  8. expect(markup('§keyboard§')).toBe('<kbd>keyboard</kbd>')
  9. expect(markup('[link](https://zammad.org)')).toBe(
  10. '<a href="https://zammad.org" target="_blank">link</a>',
  11. )
  12. })