Skip to content

Commit

Permalink
Fixes after testing with real-world files
Browse files Browse the repository at this point in the history
  • Loading branch information
fileformat committed Jan 20, 2025
1 parent 4a917a7 commit b4ff158
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const isDevMode = process.env.NODE_ENV === 'development';

const DEMO_URL = isDevMode
? "http://localhost:4000/newsblur.xml"
? "http://localhost:4000/demo.xml"
: "https://opml.xml.style/demo.xml";

export const constants = {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/loadOutline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ function processNode(retVal: OpmlData, parent: TreeItem, data: OpmlOutline[]) {

const newItem: TreeItem = {
id: `ti-${retVal.count}`,
label: item.title,
htmlUrl: purifyUrl(item.htmlUrl),
label: item.title || item.text || "",
htmlUrl: purifyUrl(item.htmlUrl) || purifyUrl(item.url),
xmlUrl: purifyUrl(item.xmlUrl),
children: [],
};
Expand Down
1 change: 1 addition & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type OpmlOutline = {
title: string;
xmlUrl: string;
htmlUrl: string;
url: string;
outline: OpmlOutline[] | OpmlOutline;
}

Expand Down

0 comments on commit b4ff158

Please sign in to comment.