fix: Expand nodes-base formatting validation (no-changelog) (#4689)

*  Simplify `format` command

* 🎨 Format more deeply nested files
This commit is contained in:
Iván Ovejero
2022-11-22 13:43:28 +01:00
committed by GitHub
parent ad6c6f60a1
commit eafef019d7
39 changed files with 8225 additions and 374 deletions

View File

@@ -950,10 +950,20 @@ export function validateJSON(json: string | undefined): any {
* @param blockValues the blockUi.blockValues node parameter.
*/
export function extractDatabaseMentionRLC(blockValues: IDataObject[]) {
blockValues.forEach(bv => {
blockValues.forEach((bv) => {
if (bv.richText && bv.text) {
const texts = (bv.text as { text: [{ textType: string, mentionType: string, database: string | { value: string, mode: string, __rl: boolean, __regex: string } }] }).text;
texts.forEach(txt => {
const texts = (
bv.text as {
text: [
{
textType: string;
mentionType: string;
database: string | { value: string; mode: string; __rl: boolean; __regex: string };
},
];
}
).text;
texts.forEach((txt) => {
if (txt.textType === 'mention' && txt.mentionType === 'database') {
if (typeof txt.database === 'object' && txt.database.__rl) {
if (txt.database.__regex) {