Skip to content

[T32231] - Ignore timestamps in links, quotes and codeblocks

Taken over from: !11 (closed)

Ignores links, quotes and codeblocks when parsing timestamps.

It is missing a particular edge case: if, in a single message, the exact same time appears on both a code block and regular text, the code block will be reformatted if it comes earlier than the text. For example:

`some code 10am GMT`

some text 10am GMT

some code 10am GMT will get formatted, while the following line will not. This happens due to the code performing a simple .replace on the original text, which will apply to the first match in the string.

The output from the time parser informs the index of the first char for a given time block, so I tried to make it work from there. This did not work, however, as the start index does not seem to be always reliable.

Merge request reports

Loading