"use strict";
const {strict: assert} = require("assert");
const {zrequire} = require("./lib/namespace");
const {run_test} = require("./lib/test");
const {page_params} = require("./lib/zpage_params");
const copy_and_paste = zrequire("copy_and_paste");
run_test("paste_handler_converter", () => {
page_params.development_environment = true;
let input =
' love the Zulip Organization.';
assert.equal(
copy_and_paste.paste_handler_converter(input),
" love the **Zulip** **Organization**.",
);
input =
'The JSDOM
constructor';
assert.equal(copy_and_paste.paste_handler_converter(input), "The `JSDOM` constructor");
input =
'https://zulip.readthedocs.io/en/latest/subsystems/logging.html';
assert.equal(
copy_and_paste.paste_handler_converter(input),
"https://zulip.readthedocs.io/en/latest/subsystems/logging.html",
);
input =
'Contributing guide';
assert.equal(
copy_and_paste.paste_handler_converter(input),
"[Contributing guide](https://zulip.readthedocs.io/en/latest/contributing/contributing.html)",
);
input =
'1. text';
assert.equal(copy_and_paste.paste_handler_converter(input), "1. text");
input =
'
Test list: