From a326553027fcf0f23e3c63c692e46194a593bd9e Mon Sep 17 00:00:00 2001 From: Steve White Date: Fri, 24 Jan 2025 11:03:21 -0600 Subject: [PATCH] Fixed arxiv link issue --- json2md/lib/lib.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/json2md/lib/lib.go b/json2md/lib/lib.go index 54ead82..4a34f08 100644 --- a/json2md/lib/lib.go +++ b/json2md/lib/lib.go @@ -105,8 +105,12 @@ func writePaperSection(file *os.File, paper PaperDecision, decisionType string) title := strings.ReplaceAll(paper.Paper.Title, "[", "\\[") title = strings.ReplaceAll(title, "]", "\\]") - fmt.Fprintf(file, "## [%s](https://arxiv.org/abs/%s)\n", title, paper.Paper.ArxivID) - fmt.Fprintf(file, "**arXiv ID:** %s\n\n", paper.Paper.ArxivID) + // Extract just the arXiv ID portion (remove any URL prefix) + arxivID := strings.TrimPrefix(paper.Paper.ArxivID, "http://arxiv.org/abs/") + arxivID = strings.TrimPrefix(arxivID, "https://arxiv.org/abs/") + + fmt.Fprintf(file, "## [%s](https://arxiv.org/abs/%s)\n", title, arxivID) + fmt.Fprintf(file, "**arXiv ID:** %s\n\n", arxivID) fmt.Fprintln(file, "**Abstract:**") // Format abstract as blockquote, handling multiple paragraphs