Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting markup into several files / cross-linking problem #115

Open
olegkrivtsov opened this issue Feb 10, 2016 · 2 comments
Open

Splitting markup into several files / cross-linking problem #115

olegkrivtsov opened this issue Feb 10, 2016 · 2 comments

Comments

@olegkrivtsov
Copy link

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.

@olegkrivtsov olegkrivtsov changed the title Splitting markdown into several files / cross-linking problem Splitting markup into several files / cross-linking problem Feb 10, 2016
@olegkrivtsov
Copy link
Author

Hi @cebe is there any progress on this? Can you just make these two changes:

  • make Parser::prepareMarkers() method protected
  • and make Parser::_depth property protected

These small changes will not break your API and will allow me to use your library without tweaking.

@cebe
Copy link
Owner

cebe commented Mar 14, 2018

hi @olegkrivtsov, is this still relevant? having separate HTML files a reference should probably include the file name to be able to link correctly.

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

No branches or pull requests

2 participants