cebe / cebe/markdown

Splitting markup into several files / cross-linking problem

Open
#115 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1k
Forks
137
PR merge metrics
No merged PRs in 30d

Description

I need to split blocks by chapters, so each chapter will be rendered to a separate HTML file. I can do this with the current version of your code (by overriding `parse()` method and enumerating top-level absy blocks), but the problem is with cross-linking elements.

A `[cross-link](#element-id)` may link to any element with "id" attribute. To correctly render links, I have to determine in what HTML file what element is located. To determine in which chapter which element will go, I would have to somehow enumerate all blocks (not only top-level ones), but this is difficult to do inside of `parse()` method (because each block type has each own structure). It would be much easier to do that inside of `parseBlocks()` method, if you made the changes I requested previously.

Can you help?

This is closely related to #113.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.