mirror of https://github.com/lukechilds/docs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
473 B
17 lines
473 B
export const remarkPlugins = (defaultLang: string) => [
|
|
[
|
|
require('../lib/remark-shiki'),
|
|
{ theme: 'Material-Theme-Default', defaultLang: defaultLang },
|
|
],
|
|
require('remark-slug'),
|
|
];
|
|
|
|
const replaceTicks = value => {
|
|
const _value = value.trim();
|
|
if (_value.startsWith('`') && !_value.endsWith('`')) {
|
|
return _value.replace('`', '');
|
|
}
|
|
return _value;
|
|
};
|
|
|
|
export const wrapValueInTicks = value => '`' + value.replace('`', '').replace('`', '') + '`';
|
|
|