Adding 'source' to register types
This commit is contained in:
@@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user