Skip to content

[BUG] Preview length setting counts markup and trims before applying it resulting in short previews and broken links. #35

@Propheticus

Description

@Propheticus

What version of Tesseract has this bug?
1.4.31

Describe the bug
The post body preview length is counting (and trimming) raw input instead of visible text after applying markdown and link tags.
This results in either very short previews or broken rendering because the markdown tag is broken off midway or the closing tag is missing.
I think the issue is it currently does something along the lines of:
Raw input > trim > apply markup > output
instead of:
Raw input > apply markup > trim > output

To Reproduce
Steps to reproduce the behaviour:

  1. Configure Tesseract setting "Post Body Preview Length" to 120
  2. View a feed with "view type" set to hybrid or compact.
  3. Notice several posts have broken markdown / link tags showing in the body preview & other posts only preview very few words when a link is involved.
  4. Also notice expanding the preview fixes the broken markup.

Expected behaviour
Links and other markdown code is applied to text before counting the length and cutting it short.
In other words: show 120 rendered characters instead of 120 characters of raw input.

Screenshots
Link broken midway:
Image

Very few words in preview when a link is involved (link url is counted towards length instead of only counting the link text):
Image
Image

Markdown broken due to cut-off:
Image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Zen Browser (Firefox)
  • Version: 1.9b (136.0)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions