diff --git a/CHANGELOG.md b/CHANGELOG.md index d72d23f..25ec25b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,14 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how - class Issue is now in [issue.ts](./src/issue.ts) - organizing imports - renaming + +## [0.0.4] - 2019-04-11 +### Fixed: +- [Issue 1][#1] - `\n` is now represented as ´
´-tag +- [Issue 2][#2] - Markdown is now represented as HTML ## [Unreleased] -- Initial release \ No newline at end of file +- Initial release + +[#1](https://github.com/IJustDev/Gitea-VSCode/issues/1) +[#2](https://github.com/IJustDev/Gitea-VSCode/issues/2) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e70e6e0..01140d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gitea-vscode", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -62,7 +62,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -305,6 +304,11 @@ "safer-buffer": "^2.1.0" } }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, "es6-promise": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", @@ -590,6 +594,36 @@ "verror": "1.10.0" } }, + "linkify-it": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.1.0.tgz", + "integrity": "sha512-4REs8/062kV2DSHxNfq5183zrqXMl7WP0WzABH9IeJI+NLm429FgE1PDecltYfnOoFDFlZGh2T8PfZn0r+GTRg==", + "requires": { + "uc.micro": "^1.0.1" + } + }, + "markdown-it": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", + "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "requires": { + "argparse": "^1.0.7", + "entities": "~1.1.1", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + }, + "marked": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.2.tgz", + "integrity": "sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA==" + }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + }, "mime-db": { "version": "1.38.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", @@ -831,8 +865,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "sshpk": { "version": "1.16.1", @@ -941,6 +974,11 @@ "integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A==", "dev": true }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", diff --git a/package.json b/package.json index 12138bb..c6e0bc4 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Gitea-VSCode", "description": "Gitea Issue Tracker for vs-code", "publisher": "IJustDev", - "version": "0.0.3", + "version": "0.0.4", "engines": { "vscode": "^1.32.0" }, @@ -83,7 +83,8 @@ }, "dependencies": { "axios": "^0.18.0", - "configparser": "^0.3.6" + "configparser": "^0.3.6", + "marked": "^0.6.2" }, "repository": { "type": "github", diff --git a/src/issueProvider.ts b/src/issueProvider.ts index 8c909b8..677eeee 100644 --- a/src/issueProvider.ts +++ b/src/issueProvider.ts @@ -1,6 +1,8 @@ import axios from "axios"; import * as vscode from "vscode"; +// const MarkdownIt = require('markdown-it'), md = new MarkdownIt(); +const marked = require("marked"); import { Issue } from "./issue"; import { RepositoryInformationManager } from "./configurationProvider"; @@ -50,7 +52,7 @@ export class OpenIssuesProvider implements vscode.TreeDataProvider { continue; } const title = issue["title"]; - const body = issue["body"]; + const body = marked(issue["body"]); const state = issue["state"]; const assignee = issue["assignee"] === null ? "None" : issue["assignee"]["username"]; const tmpIssue = new Issue("#" + id + " - " + title, id, body, state, assignee, "Frontend", vscode.TreeItemCollapsibleState.None); @@ -121,7 +123,7 @@ export class ClosedIssuesProvider implements vscode.TreeDataProvider { continue; } const title = issue["title"]; - const body = issue["body"]; + const body = marked(issue["body"]); const state = issue["state"]; const assignee = issue["assignee"] === null ? "None" : issue["assignee"]["username"]; const tmpIssue = new Issue("#" + id + " - " + title, id, body, state, assignee, "Frontend", vscode.TreeItemCollapsibleState.None); diff --git a/src/template.html.ts b/src/template.html.ts index 706f2ad..ef3eb57 100644 --- a/src/template.html.ts +++ b/src/template.html.ts @@ -29,15 +29,10 @@ export function showIssueHTML(issue: Issue) { {{assignee}} - - - Description - - - {{description}} - - +

+ {{description}} +

`.replace("{{label}}", issue.label).replace("{{state}}", issue.issueState).replace("{{assignee}}", issue.assignee).replace("{{description}}", issue.body).replace("{{label}}", issue.label); } \ No newline at end of file diff --git a/versions/gitea-vscode-0.0.4.vsix b/versions/gitea-vscode-0.0.4.vsix new file mode 100644 index 0000000..d6dcaf5 Binary files /dev/null and b/versions/gitea-vscode-0.0.4.vsix differ