Skip to content

Commit

Permalink
formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjschuang committed May 10, 2023
1 parent 356cde9 commit 62201d8
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 145 deletions.
@@ -1,13 +1,13 @@
import { defineAction } from "@pipedream/types";
import { parseHTML } from "linkedom";
import showdown from "showdown";
import jsdom from "jsdom";
import app from "../../app/formatting.app";

export default defineAction({
name: "[Text] Convert HTML to Markdown",
description: "Convert valid HTML to Markdown text",
key: "formatting-convert-html-to-markdown",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
app,
Expand All @@ -20,7 +20,7 @@ export default defineAction({
async run({ $ }): Promise<string> {
const { input } = this;
const converter = new showdown.Converter();
const dom = new jsdom.JSDOM();
const dom = parseHTML("");
const result = converter.makeMarkdown(input, dom.window.document);

$.export("$summary", "Successfully converted to Markdown");
Expand Down
@@ -1,13 +1,13 @@
import { defineAction } from "@pipedream/types";
import showdown from "showdown";
import jsdom from "jsdom";
import { parseHTML } from "linkedom";
import app from "../../app/formatting.app";

export default defineAction({
name: "[Text] Convert Markdown to HTML",
description: "Convert Markdown text to HTML",
key: "formatting-convert-markdown-to-html",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
app,
Expand All @@ -20,7 +20,7 @@ export default defineAction({
async run({ $ }): Promise<string> {
const { input } = this;
const converter = new showdown.Converter();
const dom = new jsdom.JSDOM();
const dom = parseHTML("");
const result = converter.makeHtml(input, dom.window.document);

$.export("$summary", "Successfully converted to HTML");
Expand Down
4 changes: 2 additions & 2 deletions components/formatting/package.json
@@ -1,6 +1,6 @@
{
"name": "@pipedream/formatting",
"version": "0.0.2",
"version": "0.0.3",
"description": "Pipedream Formatting Components",
"main": "dist/app/formatting.app.mjs",
"keywords": [
Expand All @@ -19,7 +19,7 @@
"dependencies": {
"@pipedream/platform": "^1.2.1",
"@pipedream/types": "^0.1.4",
"jsdom": "^21.1.0",
"linkedom": "^0.14.26",
"pluralize": "^8.0.0",
"showdown": "^2.1.0",
"title-case": "^3.0.3"
Expand Down
1 change: 1 addition & 0 deletions components/formatting/tsconfig.json
Expand Up @@ -8,6 +8,7 @@
"composite": true,
"outDir": "dist",
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
},
"allowJs": true,
"include": [
Expand Down

0 comments on commit 62201d8

Please sign in to comment.