mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-05 20:32:42 +02:00
chore(v2): fix code style (revert previous changes)
This commit is contained in:
parent
1480a7eb80
commit
1f00d15c74
143 changed files with 457 additions and 458 deletions
|
@ -57,7 +57,7 @@ describe('slug plugin', () => {
|
|||
|
||||
test('should not overwrite `data` on headings', () => {
|
||||
const result = process('# Normal\n', [
|
||||
function() {
|
||||
function () {
|
||||
function transform(tree) {
|
||||
tree.children[0].data = {foo: 'bar'};
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ describe('slug plugin', () => {
|
|||
|
||||
test('should not overwrite `data.hProperties` on headings', () => {
|
||||
const result = process('# Normal\n', [
|
||||
function() {
|
||||
function () {
|
||||
function transform(tree) {
|
||||
tree.children[0].data = {hProperties: {className: ['foo']}};
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ describe('slug plugin', () => {
|
|||
'## Something also',
|
||||
].join('\n\n'),
|
||||
[
|
||||
function() {
|
||||
function () {
|
||||
function transform(tree) {
|
||||
tree.children[1].data = {hProperties: {id: 'here'}};
|
||||
tree.children[3].data = {hProperties: {id: 'something'}};
|
||||
|
|
|
@ -12,7 +12,7 @@ const toString = require('mdast-util-to-string');
|
|||
const slugs = require('github-slugger')();
|
||||
|
||||
function slug() {
|
||||
const transformer = ast => {
|
||||
const transformer = (ast) => {
|
||||
slugs.reset();
|
||||
|
||||
function visitor(headingNode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue