Closed NQNStudios closed 6 years ago
I've realized a major flaw in the way I've implemented this: relative section is meant to always refer to what is relative to the original section's position in Markdown files. With sections sometimes being embedded in other sections in Fractive, there's no easy way to figure out the original section's position in Markdown if it's embedded in another one. It would probably be better to handle all relative section macros by replacing them at compile-time with the name of the proper section, so that at runtime it still refers to the expected section no matter what. Also, it would be useful to be able to reference relative sections in simple macros that aren't links, which I haven't implemented here. Lots to think about, but probably this isn't the PR we're looking for.
Redux of PR #50.
Changes proposed by this pull request:
data-goto-relative-section
set to either "up" or "down"Along the way I uncovered some other pre-existing bugs which I'll also be writing up.
@invicticide to review