Skip to content

Commit

Permalink
feat(Parser): add support for parsing subtitle for RichShelf (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer authored Nov 19, 2024
1 parent 4b178e4 commit 038efff
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 038efff

Please sign in to comment.