Welcome to mirror list, hosted at ThFree Co, Russian Federation.

render_identifier_paragraph.js « renderers « services « rich_content_editor « components « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4ec45ecd3a73c64edf00880ab8f37d95e7e64d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { renderUneditableBranch as render } from './render_utils';

const identifierRegex = /(^\[.+\]: .+)/;

const isIdentifier = text => {
  return identifierRegex.test(text);
};

const canRender = (node, context) => {
  return isIdentifier(context.getChildrenText(node));
};

export default { canRender, render };