Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag description is generated twice #1150

Closed
bilak opened this issue Jan 8, 2020 · 10 comments
Closed

Tag description is generated twice #1150

bilak opened this issue Jan 8, 2020 · 10 comments

Comments

@bilak
Copy link

bilak commented Jan 8, 2020

Hello,
If I have following in tags

tags:

  - name: "test"
    description: |
      ## This is just test of duplicity

Then it's rendered twice:

duplicated-tag

@AraConnect
Copy link

AraConnect commented Jan 9, 2020

Try without ## in the description

@bilak
Copy link
Author

bilak commented Jan 9, 2020

well, we use a lot of markdown syntax and this is what we want to have.

@AraConnect
Copy link

Try >- instead of |

@bilak
Copy link
Author

bilak commented Jan 9, 2020

didn't helped...still duplicate :(

@cicciodifranco
Copy link

I have the same issue... but i found a workarond.
Move your h2 to h3

  - name: "test"
    description: |
      ### This is just test of duplicity 

this solved the problem for me.
Maybe redoc have issues with h1, h2 tags.

jmendiara added a commit to jmendiara/ReDoc that referenced this issue Feb 28, 2020
* feat(cli): added support for JSON string value for --options CLI argument (Redocly#1047)

closes Redocly#797

* docs: expandDefaultServerVariables

* fix: do not crash on empty scopes

fixes Redocly#1044

* fix: auth section appears twice

fixes Redocly#818

* fix: left menu item before group is not highligted

fixes Redocly#1033

* fix: clicking on group title breaks first tag

fixes Redocly#1034

* fix: false-positive recursive detection with allOf at the same level

* fix: remove excessive whitespace between md sections on small screens

fixes Redocly#874

* chore: Release 2.0.0-rc.15 🔖

* chore(cli): redoc-cli v0.9.0

* chore(cli): update yarn.lock

* chore(cli): [email protected]

* fix: fix scrollYOffset when SSR

* chore: Release 2.0.0-rc.16 🔖

* chore(cli): [email protected]

* docs: fix typo (Redocly#1062)

* feat: added support for file paths as --options cli argument (Redocly#1049)

* fix: types over-pluralization (Redocly#1057)

fixes Redocly#1053

* docs: improve options documentation (Redocly#1071)

* Sort by name
* Document `hideSingleRequestSampleTab`
* End option description with `.`

* fix: no quotes for default values in header fields. (Redocly#1059)

* fix: changed several components style font-family to monospace (Redocly#1063)

fixes Redocly#909

* fix: active menu item scroll into view

* chore: Release 2.0.0-rc.17 🔖

* fix: improve mime-type dropdown font

* fix: add oneOf buttons vertical space when wrapped to new line

* hore: Release 2.0.0-rc.18 🔖

* fix: wrap json examples in code tag (Redocly#1064)

* feat: display `multipleOf` constrains (Redocly#1065)

* docs: fix link to x-nullable docs from README (Redocly#1135)

* fix: change the title of "Security Scheme Type" to match "HTTP Authorization Scheme" (Redocly#1126)

* docs: fixed example slack api url (Redocly#1077)

* doc: fix some typos (Redocly#1117)

* feat(cli): Fallback on the spec's title before falling back on… (Redocly#1073)

* fix: do not URI-encode parameter values for better readability

fixes Redocly#1138

* chore: upgrade deps

* feat: enable menuToggle by default

* chore: remove react-hot-loader from deps

fixes Redocly#1133

* fix: support discriminator mapping 1-n

fixes Redocly#1111

* fix: remove hardcoded fontFamily for oneOf labels

fixes Redocly#1120

* fix: h2 padding on mobile

fixes Redocly#1118

* fix: python comment stripped in headings

fixes Redocly#1116

* feat: new option hideSchemaTitles

* fix: remove implicit discriminator mapping when explicit is present

* chore: refactor request samples

* feat: new option payloadSampleIdx

* fix: search-box use theme

* fix: fix sortByRequired (stabilise sort) (Redocly#1136)

fixes Redocly#1104
fixes Redocly#1121
fixes Redocly#1061

* chore: Release 2.0.0-rc.19 🔖

* chore: update npm token for travis deploy

* chore(cli): [email protected]

* fix: fix missing parameters

fixes Redocly#1142

* chore: Release 2.0.0-rc.20 🔖

* chore(cli): [email protected]

* fix: use mobile menu background color value from theme (Redocly#1144)

* chore(cli): Lint and prettify cli/index.ts (Redocly#1074)

* fix: fix duplicated content in tags when using md headings

fixes Redocly#1150, fixes Redocly#1152

* fix: empty servers behaviour per OAS spec

fixes Redocly#1151

* chore: fix travis export vars

* tests: fix tests for empty servers

* chore: Release 2.0.0-rc.21 🔖

* chore(cli): upgrade handlebars in yarn.lock

* chore(cli): update redoc

* chore(cli): [email protected]

* feat: add HTTP syntax highlighting (Redocly#1157)

* fix: do not process oneOf if inherited from parent with discriminator

* chore: minor perf optimizations

* chore: Release 2.0.0-rc.22 🔖

* fix: fix broken sticky sidebar in Chrome 80

fixes Redocly#1167

* chore: Release 2.0.0-rc.23 🔖

* chore(cli): [email protected]

Co-authored-by: Sergey Dubovyk <[email protected]>
Co-authored-by: Roman Hotsiy <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Michael Huynh <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: russellrobinson <[email protected]>
Co-authored-by: Andrew Zhukevych <[email protected]>
Co-authored-by: Andrii Tykhan <[email protected]>
Co-authored-by: Dimitar Nanov <[email protected]>
Co-authored-by: bwjohnson-ss <[email protected]>
Co-authored-by: torbenw <[email protected]>
Co-authored-by: Chris Faulkner <[email protected]>
Co-authored-by: Zakary Kamal Ismail <[email protected]>
Co-authored-by: Nan Yan <[email protected]>
Co-authored-by: Anna Stasiuk <[email protected]>
Co-authored-by: Kryštof Korb <[email protected]>
jmendiara added a commit to jmendiara/ReDoc that referenced this issue Feb 28, 2020
* feat(cli): added support for JSON string value for --options CLI argument (Redocly#1047)

closes Redocly#797

* docs: expandDefaultServerVariables

* fix: do not crash on empty scopes

fixes Redocly#1044

* fix: auth section appears twice

fixes Redocly#818

* fix: left menu item before group is not highligted

fixes Redocly#1033

* fix: clicking on group title breaks first tag

fixes Redocly#1034

* fix: false-positive recursive detection with allOf at the same level

* fix: remove excessive whitespace between md sections on small screens

fixes Redocly#874

* chore: Release 2.0.0-rc.15 🔖

* chore(cli): redoc-cli v0.9.0

* chore(cli): update yarn.lock

* chore(cli): [email protected]

* fix: fix scrollYOffset when SSR

* chore: Release 2.0.0-rc.16 🔖

* chore(cli): [email protected]

* docs: fix typo (Redocly#1062)

* feat: added support for file paths as --options cli argument (Redocly#1049)

* fix: types over-pluralization (Redocly#1057)

fixes Redocly#1053

* docs: improve options documentation (Redocly#1071)

* Sort by name
* Document `hideSingleRequestSampleTab`
* End option description with `.`

* fix: no quotes for default values in header fields. (Redocly#1059)

* fix: changed several components style font-family to monospace (Redocly#1063)

fixes Redocly#909

* fix: active menu item scroll into view

* chore: Release 2.0.0-rc.17 🔖

* fix: improve mime-type dropdown font

* fix: add oneOf buttons vertical space when wrapped to new line

* hore: Release 2.0.0-rc.18 🔖

* fix: wrap json examples in code tag (Redocly#1064)

* feat: display `multipleOf` constrains (Redocly#1065)

* docs: fix link to x-nullable docs from README (Redocly#1135)

* fix: change the title of "Security Scheme Type" to match "HTTP Authorization Scheme" (Redocly#1126)

* docs: fixed example slack api url (Redocly#1077)

* doc: fix some typos (Redocly#1117)

* feat(cli): Fallback on the spec's title before falling back on… (Redocly#1073)

* fix: do not URI-encode parameter values for better readability

fixes Redocly#1138

* chore: upgrade deps

* feat: enable menuToggle by default

* chore: remove react-hot-loader from deps

fixes Redocly#1133

* fix: support discriminator mapping 1-n

fixes Redocly#1111

* fix: remove hardcoded fontFamily for oneOf labels

fixes Redocly#1120

* fix: h2 padding on mobile

fixes Redocly#1118

* fix: python comment stripped in headings

fixes Redocly#1116

* feat: new option hideSchemaTitles

* fix: remove implicit discriminator mapping when explicit is present

* chore: refactor request samples

* feat: new option payloadSampleIdx

* fix: search-box use theme

* fix: fix sortByRequired (stabilise sort) (Redocly#1136)

fixes Redocly#1104
fixes Redocly#1121
fixes Redocly#1061

* chore: Release 2.0.0-rc.19 🔖

* chore: update npm token for travis deploy

* chore(cli): [email protected]

* fix: fix missing parameters

fixes Redocly#1142

* chore: Release 2.0.0-rc.20 🔖

* chore(cli): [email protected]

* fix: use mobile menu background color value from theme (Redocly#1144)

* chore(cli): Lint and prettify cli/index.ts (Redocly#1074)

* fix: fix duplicated content in tags when using md headings

fixes Redocly#1150, fixes Redocly#1152

* fix: empty servers behaviour per OAS spec

fixes Redocly#1151

* chore: fix travis export vars

* tests: fix tests for empty servers

* chore: Release 2.0.0-rc.21 🔖

* chore(cli): upgrade handlebars in yarn.lock

* chore(cli): update redoc

* chore(cli): [email protected]

* feat: add HTTP syntax highlighting (Redocly#1157)

* fix: do not process oneOf if inherited from parent with discriminator

* chore: minor perf optimizations

* chore: Release 2.0.0-rc.22 🔖

* fix: fix broken sticky sidebar in Chrome 80

fixes Redocly#1167

* chore: Release 2.0.0-rc.23 🔖

* chore(cli): [email protected]

Co-authored-by: Sergey Dubovyk <[email protected]>
Co-authored-by: Roman Hotsiy <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Michael Huynh <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: russellrobinson <[email protected]>
Co-authored-by: Andrew Zhukevych <[email protected]>
Co-authored-by: Andrii Tykhan <[email protected]>
Co-authored-by: Dimitar Nanov <[email protected]>
Co-authored-by: bwjohnson-ss <[email protected]>
Co-authored-by: torbenw <[email protected]>
Co-authored-by: Chris Faulkner <[email protected]>
Co-authored-by: Zakary Kamal Ismail <[email protected]>
Co-authored-by: Nan Yan <[email protected]>
Co-authored-by: Anna Stasiuk <[email protected]>
Co-authored-by: Kryštof Korb <[email protected]>
@osamaramihafez
Copy link

osamaramihafez commented Sep 1, 2021

Will this issue be re-opened?

redoc seems to duplicate and also adds the h1 and h2 to the menu. Is there a way still add to the menu and keep only one copy in the description without duplicating (using json oas so the description is based on markup).

I'm guessing the duplication is happening due to the addition of the h1 and h2 elements to the sidebar menu.

@klaudiuszfraj
Copy link

I have the same problem, in my case it's duplicating "externalDocs" link, and when I remove that key it's duplicating my "description

Screenshot from 2021-12-01 18-16-21
"
Screenshot from 2021-12-01 18-14-04

@jaltin
Copy link

jaltin commented Feb 8, 2022

@RomanHotsiy,

We are also getting bitten by this bug. We are using 2.0.0-rc.63.

@norfas
Copy link

norfas commented Feb 15, 2022

This is an annoying bug.
Workaround is to remove line breaks and keep new lines only in Description:
Replace("\r\n", "\n")

@atruskot
Copy link

atruskot commented Jun 2, 2022

@RomanHotsiy I'm still seeing this issue in [email protected]. Although I can't reproduce when building a static page with [email protected] .

As noted by others, it is only with # or ## headers. CRLF or LF only doesn't seem to make a difference. Nor does switching between |, >, or >- for my description.

A snippet of an example below. The anchors are generated for the first header but not the second one.

name: Resources
description: >-
  This section describes the resource information models.


  ## Appointment 

  Appointment resources are used to provide information about a planned
  service.


  <SchemaDefinition schemaRef="#/components/schemas/Appointment"/>


  ## Bundle 

  Bundles are used to transport a collection of resources for transport
  during an operation. 


  <SchemaDefinition schemaRef="#/components/schemas/Bundle"/>


  ## Location 

  Details and position information for a physical place.


  <SchemaDefinition schemaRef="#/components/schemas/Location"/>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants