Skip to content
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

Rendered output displays "See also:" line twice #431

Open
kbdharun opened this issue Dec 13, 2023 · 4 comments
Open

Rendered output displays "See also:" line twice #431

kbdharun opened this issue Dec 13, 2023 · 4 comments

Comments

@kbdharun
Copy link
Member

Expected behavior

Continuing tldr-pages/tldr#5190 (comment) (cc @sbrl).

The rendered output of pages should be displayed as is without a redundant "See also:" entry below the pages.

Actual behavior

Currently, the rendered output of pages displays the "See also:" line twice and in pages using a description like encfs it might be useful but still redundant.

image

Also in pages where we add it to an existing line in those cases this additional rendering doesn't take place:

image

What do you guys think, should we remove it? (IMO removing it will make the rendering consistent with other clients which doesn't do this)

If we decide to go with it, removing the below lines would resolve this issue:

if (page.seeAlso && page.seeAlso.length > 0) {
output.push('');
output.push('See also: ' + page.seeAlso.join(', '));
output.push('');
}

Environment

  • Operating system - Linux (Ubuntu LTS 22.04, Fedora Workstation 39), Windows (11)
  • Node.js version (node --version): v20.9.0
  • tldr-node-client version (tldr --version): 3.4.0
@sbrl
Copy link
Member

sbrl commented Dec 18, 2023

Where is the bottom See also pulled from? If it's taken from the page content, I don't particularly see a reason to keep it.

I wonder what the reasoning was behind adding it in the first place was?

@kbdharun
Copy link
Member Author

Where is the bottom See also pulled from? If it's taken from the page content, I don't particularly see a reason to keep it.

Yep, it's taken from the page content.

I wonder what the reasoning was behind adding it in the first place was?

Same here, it was implemented in #81 and it seems to be discussed here in tldr-pages/tldr#481.

@owenvoke
Copy link
Member

I agree that it doesn't really make much sense, as it's usually already within the page. 👍🏻

@sbrl
Copy link
Member

sbrl commented Feb 6, 2024

Ahh I see. This feature parses

(see `blah`)

lines in descriptions, but fails to account for if they are mentioned in the See also description line.

In this case, I would consider this a bug in that feature.

@sbrl sbrl added the bug label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants