n8n-3867-progressively-apply-prettier-to-all (#3873)

* 🔨 formatting nodes with prettier
This commit is contained in:
Michael Kret
2022-08-17 18:50:24 +03:00
committed by GitHub
parent f2d326c7f0
commit 91d7e16c81
1072 changed files with 42357 additions and 59109 deletions

View File

@@ -21,7 +21,8 @@ export class Markdown implements INodeType {
icon: 'file:markdown.svg',
group: ['output'],
version: 1,
subtitle: '={{$parameter["mode"]==="markdownToHtml" ? "Markdown to HTML" : "HTML to Markdown"}}',
subtitle:
'={{$parameter["mode"]==="markdownToHtml" ? "Markdown to HTML" : "HTML to Markdown"}}',
description: 'Convert data between Markdown and HTML',
defaults: {
name: 'Markdown',
@@ -176,7 +177,8 @@ export class Markdown implements INodeType {
name: 'keepDataImages',
type: 'boolean',
default: false,
description: 'Whether to keep images with data: URI (Note: These can be up to 1MB each), e.g. <img src="data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSK......0o/">',
description:
'Whether to keep images with data: URI (Note: These can be up to 1MB each), e.g. <img src="data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSK......0o/">',
},
{
displayName: 'Line Start Escape Pattern',
@@ -335,7 +337,8 @@ export class Markdown implements INodeType {
name: 'completeHTMLDocument',
type: 'boolean',
default: false,
description: 'Whether to output a complete html document, including <html>, <head> and <body> tags instead of an HTML fragment',
description:
'Whether to output a complete html document, including <html>, <head> and <body> tags instead of an HTML fragment',
},
{
displayName: 'Customized Header ID',
@@ -365,7 +368,8 @@ export class Markdown implements INodeType {
name: 'excludeTrailingPunctuationFromURLs',
type: 'boolean',
default: false,
description: 'Whether to exclude trailing punctuation from autolinking URLs. Punctuation excluded: . ! ? ( ). Only applies if simplifiedAutoLink option is set to true.',
description:
'Whether to exclude trailing punctuation from autolinking URLs. Punctuation excluded: . ! ? ( ). Only applies if simplifiedAutoLink option is set to true.',
},
{
displayName: 'GitHub Code Blocks',
@@ -379,7 +383,8 @@ export class Markdown implements INodeType {
name: 'ghCompatibleHeaderId',
type: 'boolean',
default: false,
description: 'Whether to generate header IDs compatible with github style (spaces are replaced with dashes and a bunch of non alphanumeric chars are removed)',
description:
'Whether to generate header IDs compatible with github style (spaces are replaced with dashes and a bunch of non alphanumeric chars are removed)',
},
{
displayName: 'GitHub Mention Link',
@@ -460,7 +465,8 @@ export class Markdown implements INodeType {
name: 'rawHeaderId',
type: 'boolean',
default: false,
description: 'Whether to remove only spaces, \' and " from generated header IDs (including prefixes), replacing them with dashes (-)',
description:
'Whether to remove only spaces, \' and " from generated header IDs (including prefixes), replacing them with dashes (-)',
},
{
displayName: 'Raw Prefix Header ID',
@@ -474,7 +480,8 @@ export class Markdown implements INodeType {
name: 'simpleLineBreaks',
type: 'boolean',
default: false,
description: 'Whether to parse line breaks as <br>, like GitHub does, without needing 2 spaces at the end of the line',
description:
'Whether to parse line breaks as <br>, like GitHub does, without needing 2 spaces at the end of the line',
},
{
displayName: 'Smart Indentation Fix',
@@ -537,25 +544,39 @@ export class Markdown implements INodeType {
const options = this.getNodeParameter('options', i) as IDataObject;
const destinationKey = this.getNodeParameter('destinationKey', i) as string;
const textReplaceOption = this.getNodeParameter('options.textReplace.values', i, []) as IDataObject[];
const textReplaceOption = this.getNodeParameter(
'options.textReplace.values',
i,
[],
) as IDataObject[];
options.textReplace = !isEmpty(textReplaceOption)
? textReplaceOption.map((entry) => [entry.pattern, entry.replacement])
: undefined;
const lineStartEscapeOption = this.getNodeParameter('options.lineStartEscape.value', i, {}) as IDataObject;
const lineStartEscapeOption = this.getNodeParameter(
'options.lineStartEscape.value',
i,
{},
) as IDataObject;
options.lineStartEscape = !isEmpty(lineStartEscapeOption)
? [lineStartEscapeOption.pattern, lineStartEscapeOption.replacement]
: undefined;
const globalEscapeOption = this.getNodeParameter('options.globalEscape.value', i, {}) as IDataObject;
const globalEscapeOption = this.getNodeParameter(
'options.globalEscape.value',
i,
{},
) as IDataObject;
options.globalEscape = !isEmpty(globalEscapeOption)
? [globalEscapeOption.pattern, globalEscapeOption.replacement]
: undefined;
options.ignore = options.ignore
? (options.ignore as string).split(',').map(element => element.trim()) : undefined;
? (options.ignore as string).split(',').map((element) => element.trim())
: undefined;
options.blockElements = options.blockElements
? (options.blockElements as string).split(',').map(element => element.trim()) : undefined;
? (options.blockElements as string).split(',').map((element) => element.trim())
: undefined;
const markdownOptions = {} as IDataObject;