src/client/components/PlainMarkdownInput/slate/tokenizer.js
function getUrlToken({ tokens, intEmphasis, num }) {
  const urlContent = `(${getAttr(tokens[num].attrs, 'href')})`;
  const urlLength = urlContent.length;
  const punctuation1 = {
    type: "punctuation",
    content: "[",
    length: 1
  };
  const punctuation2 = {
    type: "punctuation",
    content: "]",
    length: 1
  };
  const urlContentObj = {
    type: "punctuation",
    content: urlContent,
    length: urlLength
  };
  const content = Array.isArray(intEmphasis) ?
    [punctuation1, ...intEmphasis, punctuation2, urlContentObj] :
    [punctuation1, intEmphasis, punctuation2, urlContentObj];
  return {
    type: "url",
    content,
    length: Array.isArray(intEmphasis) ? getTokensLength(content) : 1 + intEmphasis.length + 1 + urlLength
  };
}
function getUrlToken({ tokens, intEmphasis, num }) {
  const urlContent = `(${getAttr(tokens[num].attrs, 'href')})`;
  const urlLength = urlContent.length;
  const punctuation1 = {
    type: "punctuation",
    content: "[",
    length: 1
  };
  const punctuation2 = {
    type: "punctuation",
    content: "]",
    length: 1
  };
  const urlContentObj = {
    type: "punctuation",
    content: urlContent,
    length: urlLength
  };
  const content = Array.isArray(intEmphasis) ?
    [punctuation1, ...intEmphasis, punctuation2, urlContentObj] :
    [punctuation1, intEmphasis, punctuation2, urlContentObj];
  return {
    type: "url",
    content,
    length: Array.isArray(intEmphasis) ? getTokensLength(content) : 1 + intEmphasis.length + 1 + urlLength
  };
}
function getUrlToken ( { tokens , intEmphasis , num } ) { const urlContent = ` ${ getAttr ( tokens [ num ] . attrs , 'href' ) } ` ; const urlLength = urlContent . length ; const punctuation1 = { type : "punctuation" , content : "[" , length : 1 } ; const punctuation2 = { type : "punctuation" , content : "]" , length : 1 } ; const urlContentObj = { type : "punctuation" , content : urlContent , length : urlLength } ; const content = Array . isArray ( intEmphasis ) ? [ punctuation1 , ... intEmphasis , punctuation2 , urlContentObj ] : [ punctuation1 , intEmphasis , punctuation2 , urlContentObj ] ; return { type : "url" , content , length : Array . isArray ( intEmphasis ) ? getTokensLength ( content ) : 1 + intEmphasis . length + 1 + urlLength } ; }
getUrlToken - Function create url-token

@param tokens
@param intEmphasis
@param num
@returns {{type: string, content: [null,null,null,null], length: *}}
getUrlToken - Function create url - token