-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(integrations/telegram): add support for standard markdown #14060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: telegram_1.0.0
Are you sure you want to change the base?
Conversation
… splitRangeTestCases
- The markdown "__{text}__" was actually an alternative markdown for bold not italic
- Changed italic effect markdown from "_{text}_" to "*{text}*" since the underscore markdown only works when it's adjacent to whitespace in the text
…thin larger segments
- This is because we don't need to sort if there's only 1 or less elements
…partially nests a smaller segment
… specific test case
a30809b
to
c54d8e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is still a draft, so I don't want to add too many comments yet. Keep up the good work. I like what I read.
test.each(telegramToMarkdownTestCases)('$description', ({ input, expects }: TelegramToMarkdownTestCase) => { | ||
const consoleWarn = console.warn | ||
|
||
console.warn = (firstArg: unknown, ...args: unknown[]) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: This strategy will stop working as soon as you change the log message. Instead, your function applyMarksToText
should return a list of warnings and errors. You can use these warnings in your tests and also log them in the actual integration's implementation
consoleWarn(firstArg, ...args) | ||
} | ||
|
||
expect(applyMarksToText(input.text, input.marks)).toBe(expects) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chore: As we've already discussed in person, you shouldn't test internal private functions directly. These are implementation details and should be allowed to change without affecting the tests
2297dc4
to
f4463e2
Compare
…h test case order
…ince it is an ignored effect
From Linear issue SQD-3049