Skip to content

header arent working as suppose too #1432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
github-actions bot opened this issue Jul 29, 2022 · 0 comments
Open

header arent working as suppose too #1432

github-actions bot opened this issue Jul 29, 2022 · 0 comments
Labels

Comments

@github-actions
Copy link

code:objectBuilder(REGEXP_CODE, _code, false),

REGEXP_SUB_LISTS,

getParsedSubList,

listItemLiteral

),

first two params never used

list:objectBuilder(REGEXP_UL_LIST, getParsedSubList, listLiteral),

ulList:objectBuilder(REGEXP_UL_LIST, _ulList, listLiteral),

olList:objectBuilder(REGEXP_OL_LIST, _olList, false),

REGEXP_SPONSORSHIP,

_sponsorship,

sponsorLiteral,

);

memes:objectBuilder(REGEXP_MEM, _meme, false);

REGEXP_SEPARATOR,

_separator,

separatorLiteral

);

// constant: REGEXP_EMPTY_UL,

// replacer: emptyUl

// },

// constant: REGEXP_EMPTY_OL,

// replacer: emptyOl

// },

// constant: REGEXP_EMPTY_BLOCKQUOTE,

// replacer: emptyBlockQuote

// },

// TODO header arent working as suppose too

import { Callbacks } from '../../../callbacksReact';

import {
  REGEXP_HEADER,
  REGEXP_IMAGE,
  REGEXP_LINK,
  REGEXP_STRONG,
  REGEXP_DEL,
  // REGEXP_Q,
  // REGEXP_CODE,
  // REGEXP_UL_LIST,
  // REGEXP_OL_LIST,
  REGEXP_BLOCKQUOTE,
  REGEXP_HR,
  REGEXP_BR,
  REGEXP_EM,
  // REGEXP_SPONSORSHIP,
  // REGEXP_MEM,
  REGEXP_PREVIEW_TEXT,
  REGEXP_PARAGRAPH,
  // REGEXP_SEPARATOR,
} from '../../../constants/index';

import * as typography from '../../../templates/NewsletterReactTemplate/typography';

import objectBuilder from '../../md/object-builder';

const {
  _strong,
  _link,
  _blockquote,
  //   _mem,
  _header,
  _italic,
  _del,
  // _q,
  // _code,
  _hr,
  //   _empty,
  //------------
  // _ulList,
  // _olList,
  //------------
  _image,
  _paragraph,
  // _sponsorship,
  _br,
  //------------
  // _separator,

  _previewText,
} = Callbacks;

const {
  headingLiteral,
  imageLiteral,
  italicLiteral,
  linkLiteral,
  // listLiteral,
  // listItemLiteral,
  titleLiteral,
  paragraphLiteral,
  // qLiteral,
  strongLiteral,
  subtitleLiteral,
  // separatorLiteral,
  //----------
  // blockquoteLiteral,
  // codeLiteral,
  // delLiteral,
  previewTextLiteral,
} = typography;

const map = {
  strong: objectBuilder(REGEXP_STRONG, _strong, strongLiteral),
  link: objectBuilder(REGEXP_LINK, _link, linkLiteral),
  del: objectBuilder(REGEXP_DEL, _del, false),
  image: objectBuilder(REGEXP_IMAGE, _image, imageLiteral),
  previewText: objectBuilder(
    REGEXP_PREVIEW_TEXT,
    _previewText,
    previewTextLiteral,
  ),
  italic: objectBuilder(REGEXP_EM, _italic, italicLiteral),
  header: objectBuilder(REGEXP_HEADER, _header, headingLiteral),
  // TODO header arent working as suppose too
  subtitle: objectBuilder(REGEXP_HEADER, _header, subtitleLiteral),
  title: objectBuilder(REGEXP_HEADER, _header, titleLiteral),
  // q:objectBuilder(REGEXP_Q, _q, false),
  // code:objectBuilder(REGEXP_CODE, _code, false),

  // listItem:objectBuilder(
  //   REGEXP_SUB_LISTS,
  //   getParsedSubList,
  //   listItemLiteral
  //   ),

  // this object used only as a stupid way to add a parch for different cases of lists
  // first two params never used
  // list:objectBuilder(REGEXP_UL_LIST, getParsedSubList, listLiteral),
  // ulList:objectBuilder(REGEXP_UL_LIST, _ulList, listLiteral),
  // olList:objectBuilder(REGEXP_OL_LIST, _olList, false),
  blockquote: objectBuilder(REGEXP_BLOCKQUOTE, _blockquote, false),
  hr: objectBuilder(REGEXP_HR, _hr, false),
  paragraph: objectBuilder(REGEXP_PARAGRAPH, _paragraph, paragraphLiteral),
  br: objectBuilder(REGEXP_BR, _br),
};
// sponsorship:objectBuilder(
//   REGEXP_SPONSORSHIP,
//   _sponsorship,
//   sponsorLiteral,
// );

// // //  memeLiteral,
// memes:objectBuilder(REGEXP_MEM, _meme, false);

// separator:objectBuilder(
//   REGEXP_SEPARATOR,
//   _separator,
//   separatorLiteral
//   );

// // 'REGEXP_EMPTY_UL': {
// //   constant: REGEXP_EMPTY_UL,
// //   replacer: emptyUl
// // },

// // 'REGEXP_EMPTY_OL': {
// //   constant: REGEXP_EMPTY_OL,
// //   replacer: emptyOl
// // },

// // 'REGEXP_EMPTY_BLOCKQUOTE': {
// //   constant: REGEXP_EMPTY_BLOCKQUOTE,
// //   replacer: emptyBlockQuote
// // },

export default map;
@github-actions github-actions bot added the todo label Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants