LearnNewsExamplesServices
Frontmatter
id8068
titleRefactor Markdown Component to Handle Headline Parsing
stateClosed
labels
airefactoringarchitecture
assigneestobiu
createdAtDec 9, 2025, 3:15 PM
updatedAtDec 9, 2025, 3:16 PM
githubUrlhttps://github.com/neomjs/neo/issues/8068
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 9, 2025, 3:16 PM

Refactor Markdown Component to Handle Headline Parsing

Closed v11.17.0 airefactoringarchitecture
tobiu
tobiu commented on Dec 9, 2025, 3:15 PM

The updateContentSectionsStore method in ContentComponent currently handles two responsibilities: parsing headlines to add neo-h* classes for styling, and updating the side navigation store.

To improve separation of concerns and reuse, the headline parsing logic should be moved to the base Neo.component.Markdown class.

Changes:

  1. Move headline parsing logic (regex, neo-h* class injection) to Neo.component.Markdown.
  2. Refactor ContentComponent to override the parsing method to handle its store updates while delegating the core parsing to the parent class.
  3. Ensure ContentComponent removes the duplicated updateContentSectionsStore method.
  4. Remove the duplicated regex definition.
tobiu added the ai label on Dec 9, 2025, 3:15 PM
tobiu added the refactoring label on Dec 9, 2025, 3:15 PM
tobiu added the architecture label on Dec 9, 2025, 3:15 PM
tobiu assigned to @tobiu on Dec 9, 2025, 3:16 PM
tobiu referenced in commit 50eafaa - "Refactor Markdown Component to Handle Headline Parsing #8068" on Dec 9, 2025, 3:16 PM
tobiu closed this issue on Dec 9, 2025, 3:16 PM