Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Documentation editor adds an extra trailing newline after fenced code blocks (entityV2 htmlToMarkdown) #14935

Open
Assignees
Labels
bugBug report datahub-v1.0-rcIssue or PR related to DataHub v1.0 Release Candidates
@a-chumagin

Description

Summary

When adding a fenced code block in the Documentation tab (entityV2 editor), an extra blank line is appended after the closing backticks. This appears to stem from the code block conversion rule plus missing trailing trim in entityV2’s htmlToMarkdown.

Affected component

  • datahub-web-reactentityV2 Documentation editor
  • File: datahub-web-react/src/app/entityV2/shared/tabs/Documentation/components/editor/extensions/htmlToMarkdown.tsx

Steps to reproduce

  1. Open any entity’s Documentation tab (new/entityV2 editor).
  2. Insert a code block via the UI "this is code"
  3. Save.
  4. Observe: rendered Markdown shows an extra blank line after the code block.
Image

Expected behavior

  • The Markdown ends at the closing fence, consistent with unit test expectations (no trailing blank line after the closing ```).

Actual behavior

  • There is always an extra blank line after the closing ``` when the description ends with a code block (or contains only a code block).

Metadata

Metadata

Labels

bugBug report datahub-v1.0-rcIssue or PR related to DataHub v1.0 Release Candidates

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /