Skip to content

Commit

Permalink
feat(Parser): add support for parsing subtitle for RichShelf
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer committed Nov 17, 2024
1 parent bdebb9f commit 7c18772
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/parser/classes/RichShelf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default class RichShelf extends YTNode {
title: Text;
contents: ObservedArray<YTNode>;
endpoint?: NavigationEndpoint;
subtitle?: Text;

constructor(data: RawNode) {
super();
Expand All @@ -18,5 +19,9 @@ export default class RichShelf extends YTNode {
if (Reflect.has(data, 'endpoint')) {
this.endpoint = new NavigationEndpoint(data.endpoint);
}

if (Reflect.has(data, 'subtitle')) {
this.subtitle = new Text(data.subtitle);
}
}
}

0 comments on commit 7c18772

Please sign in to comment.