verdaccio icon indicating copy to clipboard operation
verdaccio copied to clipboard

Package summary contains markdown instead of first plain text sentence

Open tiguchi opened this issue 3 years ago • 3 comments

Your Environment

  • verdaccio version: 5.2.2
  • node version: v12.22.7
  • package manager: [email protected]
  • os: Debian 10
  • platform: npm

Describe the bug

I created a README.md in the root directory of an NPM package project that contains a build status badge as Markdown clickable image tag of the following format:

# Project Name
[![Build Status](https://some.url/build/status)](https://some.url/path/to/detail/page)

Project summary

The readme appears correct on the package's detail page. But the project summary contains only the unfiltered mardkown of the build status badge:

2021-12-10_13-40

Expected behavior

I expect the actual summary (first plain text sentence of the readme) to appear instead:

2021-12-10_13-42

tiguchi avatar Dec 10 '21 21:12 tiguchi

I just realized that package.json has support for a "description" field, which was missing in my affected project. I added that missing property, deployed a new version of the package to Verdaccio and the correct description text is showing now.

So this is really a minor problem with a good workaround. Feel free to close this ticket

tiguchi avatar Dec 10 '21 22:12 tiguchi

So, if you don't include the description field on publish the readme became description by default? 🤔

juanpicado avatar Dec 11 '21 08:12 juanpicado

So, if you don't include the description field on publish the readme became description by default? 🤔

That's correct, and It seems to be working pretty well, except for that image markup glitch. The fallback even skips the first heading line (# Title) and goes straight to the first sentence of the readme

tiguchi avatar Dec 11 '21 17:12 tiguchi