Skip to content

Bug: exppected a closing tag for <b> before the end of emphasis #2214

@PaulRBerg

Description

@PaulRBerg

Describe the bug

There are some Inputs for which graphql-markdown generates incorrect MDX like this:

#### [<code style={{ fontWeight: 'normal' }}>Batcher*filter.<b>batches*</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>Batch_filter</b></code>](/docs/api/06-flow/02-the-graph/inputs/batch-filter.mdx) <Badge class="badge badge--secondary " text="input"/>

This is not MDX-compliant:

Expected a closing tag for `<b>` (133:61-133:64) before the end of `emphasis`MDX[mdast-util-mdx-jsx:end-tag-mismatch](https://mdxjs.com/docs/troubleshooting-mdx/)

To Reproduce

Generate the GraphQL Markdown files using the config file. Here's the full source code of the generated MDX file:

Toggle to see MDX file

---
id: batcher-filter
title: Batcher_filter
---

<head>
<meta content="noindex" name="robots" />
<meta charset="utf-8" />
</head>

export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}>&nbsp;&nbsp;</span></>

export const SpecifiedBy = (props) => <>Specification<a className="link" style={{ fontSize:'1.5em', paddingLeft:'4px' }} target="\_blank" href={props.url} title={'Specified by ' + props.url}>⎘</a></>

export const Badge = (props) => <><span className={props.class}>{props.text}</span></>

import { useState } from 'react';

export const Details = ({ dataOpen, dataClose, children, startOpen = false }) => {
const [open, setOpen] = useState(startOpen);
return (
<details {...(open ? { open: true } : {})} className="details" style={{ border:'none', boxShadow:'none', background:'var(--ifm-background-color)' }}>
<summary
onClick={(e) => {
e.preventDefault();
setOpen((open) => !open);
}}
style={{ listStyle:'none' }} >
{open ? dataOpen : dataClose}
</summary>
{open && children}
</details>
);
};

No description

```graphql
input Batcher_filter {
  id: String
  id_not: String
  id_gt: String
  id_lt: String
  id_gte: String
  id_lte: String
  id_in: [String!]
  id_not_in: [String!]
  id_contains: String
  id_contains_nocase: String
  id_not_contains: String
  id_not_contains_nocase: String
  id_starts_with: String
  id_starts_with_nocase: String
  id_not_starts_with: String
  id_not_starts_with_nocase: String
  id_ends_with: String
  id_ends_with_nocase: String
  id_not_ends_with: String
  id_not_ends_with_nocase: String
  batchCounter: BigInt
  batchCounter_not: BigInt
  batchCounter_gt: BigInt
  batchCounter_lt: BigInt
  batchCounter_gte: BigInt
  batchCounter_lte: BigInt
  batchCounter_in: [BigInt!]
  batchCounter_not_in: [BigInt!]
  batches_: Batch_filter
  _change_block: BlockChangedFilter
  and: [Batcher_filter]
  or: [Batcher_filter]
}
```

### Fields

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_not</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_gt</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_lt</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_gte</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_lte</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_in</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>[String!]</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="list"/> <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_not_in</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>[String!]</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="list"/> <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_contains</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_contains_nocase</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_not_contains</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_not_contains_nocase</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_starts_with</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_starts_with_nocase</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_not_starts_with</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_not_starts_with_nocase</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_ends_with</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_ends_with_nocase</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_not_ends_with</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>id_not_ends_with_nocase</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>String</b></code>](/docs/api/06-flow/02-the-graph/scalars/string.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>batchCounter</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>BigInt</b></code>](/docs/api/06-flow/02-the-graph/scalars/big-int.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>batchCounter_not</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>BigInt</b></code>](/docs/api/06-flow/02-the-graph/scalars/big-int.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>batchCounter_gt</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>BigInt</b></code>](/docs/api/06-flow/02-the-graph/scalars/big-int.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>batchCounter_lt</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>BigInt</b></code>](/docs/api/06-flow/02-the-graph/scalars/big-int.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>batchCounter_gte</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>BigInt</b></code>](/docs/api/06-flow/02-the-graph/scalars/big-int.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>batchCounter_lte</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>BigInt</b></code>](/docs/api/06-flow/02-the-graph/scalars/big-int.mdx) <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>batchCounter_in</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>[BigInt!]</b></code>](/docs/api/06-flow/02-the-graph/scalars/big-int.mdx) <Badge class="badge badge--secondary " text="list"/> <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>batchCounter_not_in</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>[BigInt!]</b></code>](/docs/api/06-flow/02-the-graph/scalars/big-int.mdx) <Badge class="badge badge--secondary " text="list"/> <Badge class="badge badge--secondary " text="scalar"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher*filter.<b>batches*</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>Batch_filter</b></code>](/docs/api/06-flow/02-the-graph/inputs/batch-filter.mdx) <Badge class="badge badge--secondary " text="input"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>\_change_block</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>BlockChangedFilter</b></code>](/docs/api/06-flow/02-the-graph/inputs/block-changed-filter.mdx) <Badge class="badge badge--secondary " text="input"/>

Filter for the block changed event.

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>and</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>[Batcher_filter]</b></code>](/docs/api/06-flow/02-the-graph/inputs/batcher-filter.mdx) <Badge class="badge badge--secondary " text="list"/> <Badge class="badge badge--secondary " text="input"/>

#### [<code style={{ fontWeight: 'normal' }}>Batcher_filter.<b>or</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>[Batcher_filter]</b></code>](/docs/api/06-flow/02-the-graph/inputs/batcher-filter.mdx) <Badge class="badge badge--secondary " text="list"/> <Badge class="badge badge--secondary " text="input"/>

### Member Of

[`Batch_filter`](/docs/api/06-flow/02-the-graph/inputs/batch-filter.mdx) <Badge class="badge badge--secondary badge--relation" text="input"/><Bullet />[`Batcher_filter`](/docs/api/06-flow/02-the-graph/inputs/batcher-filter.mdx) <Badge class="badge badge--secondary badge--relation" text="input"/><Bullet />[`batchers`](/docs/api/06-flow/02-the-graph/queries/batchers.mdx) <Badge class="badge badge--secondary badge--relation" text="query"/>

  • GraphQL schema

https://api.studio.thegraph.com/query/112500/sablier-airdrops-ethereum/version/latest

  • Docusaurus configuration
[
  "@graphql-markdown/docusaurus",
  {
    baseURL: "./docs/api/06-flow/02-the-graph",
    loaders: {
      UrlLoader: {
        module: "@graphql-tools/url-loader",
      },
    } as LoaderOption,
    metatags: [{ content: "noindex", name: "robots" }, { charset: "utf-8" }],
    pretty: true,
    printTypeOptions: {
      hierarchy: "entity",
    },
    rootPath: ".",
    schema: "https://api.studio.thegraph.com/query/112500/sablier-flow-experimental/version/latest",
  } satisfies ConfigOptions,
];

Expected behavior

Instead of:

Stream*filter.<b>actions*

It should be:

Stream_filter.<b>actions*

Additional context

Docusaurus v3.8.1 and:

"@graphql-markdown/docusaurus": "^1.29.0",
"@graphql-markdown/types": "^1.7.0",
"@graphql-tools/url-loader": "^8.0.31",

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions