Skip to content

EPMRPP-114938 || Fix incorrect text concatenation in schema.org JSON-LD - #1178

Merged
allaprischepa merged 1 commit into
developfrom
feature/EPMRPP-114938-fix-incorrect-text-concatenation
Sep 24, 2026
Merged

allaprischepa merged 1 commit into
developfrom
feature/EPMRPP-114938-fix-incorrect-text-concatenation

Conversation

@allaprischepa

@allaprischepa allaprischepa commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Problem: mdast-util-to-string concatenates text from all child nodes without any separator. For inline nodes, this is correct – they sit inside a single paragraph and don't need spacing. However, block-level nodes (paragraph, heading, list, listItem, blockquote, code) are structurally separate pieces of content, so adjacent blocks were being joined without a space: e.g., "Verify Docker & Compose Installationdocker --version".

Fix: Added a BLOCK_CHILD_TYPES check in nodeToText. When a node's children include any block-level element, the function recursively processes each child and joins the results with a single space. When all children are inline nodes, it falls back to mdastToString as before.

Affected pages:

  • FAQ – list items in answers
  • Deploy with Docker – ordered list steps (HowTo schema)
  • Deploy without Docker – component version lists
  • Hardware Requirements– PostgreSQL config blocks
  • AWS Load Balancer Integration on EKS, Basic monitoring configuration, Setup TLS / HTTPS Docker Compose + Traefik v2 – prerequisite/summary lists

Links

EPMRPP-114938

Visuals

Before:
Screenshot 2026-09-24 101712

After:
Screenshot 2026-09-24 101721


Before:
Screenshot 2026-09-24 090310

After:
Screenshot 2026-09-24 095221


Before:
Screenshot 2026-09-24 094613

After:
Screenshot 2026-09-24 095334

Summary by CodeRabbit

  • Bug Fixes
    • Improved text extraction from content with paragraphs, headings, lists, blockquotes, and code blocks, preserving readable spacing between sections.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b18ff817-0b26-4365-89f1-966642d5a6e7

📥 Commits

Reviewing files that changed from the base of the PR and between fc5031b and f0b6a51.

📒 Files selected for processing (1)
  • plugins/plugin-schema-org/parser.js

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

nodeToText now checks for block-level child nodes. It recursively converts those children and joins their text with spaces. Nodes without block-level children continue to use mdastToString.

Changes

Schema.org text parsing

Layer / File(s) Summary
Block-child text conversion
plugins/plugin-schema-org/parser.js
BLOCK_CHILD_TYPES lists the block-level child types. When a node has a child of one of these types, nodeToText recursively converts its children and joins the results with spaces. Otherwise, it uses mdastToString as before.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f0b6a

The Schema.org text-spacing change is mergeable after normal checks; no concrete blocking issue was established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the issue and the main change: fixing incorrect text concatenation in schema.org JSON-LD. It is specific and concise.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

I’m a rabbit parsing blocks with care
I join child text with spaces there
When block children are not in sight
The prior text path stays in flight
Hop, clean words, into the light!

Comment @coderabbitai help to get the list of available commands.

@allaprischepa
allaprischepa merged commit 5e4e741 into develop Sep 24, 2026
2 checks passed
@allaprischepa
allaprischepa deleted the feature/EPMRPP-114938-fix-incorrect-text-concatenation branch September 24, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants