Adding 'source' to register types

This commit is contained in:
2025-10-10 13:00:04 +01:00
parent 4fb1cb1f8c
commit cb3b9abaaa
2 changed files with 9 additions and 1 deletions

View File

@@ -54,6 +54,11 @@ export default function RegisterDetail({
)} )}
</Card.Body> </Card.Body>
</Card> </Card>
<code>
{register.source.map((line, index) => (
<span key={index}>{line}<br /></span>
))}
</code>
</Col> </Col>
); );
} }

View File

@@ -26,6 +26,7 @@ export interface Register {
text: string; text: string;
notes: Note[]; notes: Note[];
issue_4_only: boolean; issue_4_only: boolean;
source: string[];
} }
/** /**
@@ -73,7 +74,8 @@ export function processRegisterBlock(paragraph: string, registers: Register[]) {
description: description, description: description,
notes: [], notes: [],
text: "", text: "",
issue_4_only: false issue_4_only: false,
source: []
}; };
const descriptionLines = description.split('\n'); const descriptionLines = description.split('\n');
@@ -84,6 +86,7 @@ export function processRegisterBlock(paragraph: string, registers: Register[]) {
if(line.includes('Issue 4 Only')) reg.issue_4_only = true; if(line.includes('Issue 4 Only')) reg.issue_4_only = true;
const trimmedLine = line.trim(); const trimmedLine = line.trim();
reg.source.push(trimmedLine);
if (trimmedLine.startsWith('//')) continue; if (trimmedLine.startsWith('//')) continue;