Skip to content

Operation macro corrupts snippets with UTF-8 characters #696

Closed
@grolljak

Description

@grolljak

Hi, I have a case where I need to include a special character ä inside documentation.

Plugins/Dependencies I am using:

id("org.springframework.boot") version "2.3.3.RELEASE"
id("org.asciidoctor.jvm.convert") version "3.2.0"
implementation("org.springframework.restdocs:spring-restdocs-mockmvc")
implementation("org.springframework.restdocs:spring-restdocs-asciidoctor")
asciidoctorExtensions("org.springframework.restdocs:spring-restdocs-asciidoctor")

Problematic part of generated snippet response-fields.adoc
|The zip type, one of [grossempfänger, normal, postfach, alte plz].

Then I am including this snippet in HTML documentation via:
include::{path}/response-fields.adoc[]
and also via:
operation::{name_of_the_snippet}[snippets='response-fields']

In the first case I get correct result generated in HTML:
The zip type, one of [grossempfänger, normal, postfach, alte plz].

In the second case, if I use operations macro:
The zip type, one of [grossempfänger, normal, postfach, alte plz].

I am suspecting an issue with parsing snippets in this file, but I am not that familiar with Ruby language: https://github.com/spring-projects/spring-restdocs/blob/master/spring-restdocs-asciidoctor-support/src/main/resources/extensions/operation_block_macro.rb

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions