## Summary * **What is the goal of this PR?** * Increase the allowed link length for footnotes * **What changes are included?** * Un-magic-numbers parts of the footnote parser * Increases max href length ## Additional Context * Additional RAM usage was not noticable to me, worst case 16 * 128 * 2 = 4KB instead of previously 16 * 88 * 2 ~ 2.8KB, see #1031 * Motivation: My book navigated me to the start of the footnote chapter, which required manual navigating for every footnote due to ungodly file name choices which pushed the required href length to 72, which caused truncating, which caused Crosspoint to not find the anchor (Sacred and Terrible Air, available via reddit) --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
17 lines
256 B
C
17 lines
256 B
C
#pragma once
|
|
|
|
#include <cstring>
|
|
|
|
#define FOOTNOTE_NUMBER_LEN 32
|
|
#define FOOTNOTE_HREF_LEN 96
|
|
|
|
struct FootnoteEntry {
|
|
char number[FOOTNOTE_NUMBER_LEN];
|
|
char href[FOOTNOTE_HREF_LEN];
|
|
|
|
FootnoteEntry() {
|
|
number[0] = '\0';
|
|
href[0] = '\0';
|
|
}
|
|
};
|