Skip to content

Markdown link open a new tab/window #3473

@ciberkids

Description

@ciberkids
  • swagger-ui version: v3.0.21
swagger: '2.0'
info:
  version: "1.0.0-alpha"
  title: Answer to life
  description: |

      # Documentation

      This endpoint can solve the problems of the world:
      [look at its specification](#/WorldEndpoint)

paths:
  #  endpoints
  /:
    get:
      summary: the answer is 42
      description: |
        # Information
          for understanding this endpoint you have to have a look at the
          [Documentation](#/Documentation)
      operationId: getanswer
      tags:
        - WorldEndpoint
      responses:
        200:
          description: The api information is returned. 

Using this example is impossible to have a normal navigation between the two generated paragraph.

The link from the "Documentation" section open a new tab/window.
The link from the endpoint it isn't referring the paragraph.

As a solution I would like to suggest these two things:

  • intercept the default href behaviour and add the "preventdefault" and the call to the "scrolltosource" (into the Markdown provider)
  • add ids to the h1 - h3 header in order to use the solution mentioned above.

the problem has been tested here: http://editor.swagger.io/#/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions