Output format error if single quote used in feature definition
See original GitHub issueHello,
I know it’s probably not a common use case in English, but in French we often need to use single quotes as separator between words. So it’s difficult to avoid them in feature definition and I encountered a problem with the documentation generation with the following example :
# language: fr
Fonctionnalité: Parcours de recherche d'un article
Scénario: Recherche d'un article connu
Etant donné que je connais déjà l'article
Lorsque je le cherche dans les rayons
Alors je le trouve à sa place
The single quote in d’un is causing a mess during generation. And the resulting html report could be seen here : https://gregorybevan.github.io/sbt-with-cucumber/cucumber.html
It seems that the problem comes from the string Parcours-de-recherche-d’un-article in the generated .adoc
https://gregorybevan.github.io/sbt-with-cucumber/cucumber.adoc
I have already checked that it’s not linked to the language of the feature file.
Sample project available here
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
“Double Quotes” vs 'Single Quotes' vs `Backticks` in JavaScript
In JavaScript, single quotes ( '' ) and double quotes ( “” ) are used to create string literals. Most developers use single...
Read more >What do single quotes do in C++ when used on multiple ...
A multicharacter literal has type int and implementation-defined value. ... if you don't use up all 4 characters, the result becomes wrong below....
Read more >about Quoting Rules - PowerShell | Microsoft Learn
Describes rules for using single and double quotation marks in PowerShell.
Read more >How to Escape Single Quotes in SQL - Database Star
When you are working with text values in SQL, you use single quote characters. This could be when you're selecting them: SELECT 'Database...
Read more >Single, Double, and Triple Quotes in Python | by Yong Cui
How can we fix this error? One is to escape the single quote by placing a backslash before it. The other is to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @rdlopes, that’s amazing, thank you!
Hi @GregoryBevan, I’ve played a bit with your sample project (thanks for that) but couldn’t even make it work with pure Asciidoctor.
The main issue with single quotes is on the anchor link:
Asciidoctor use single quotes to enable variable substitutions in links/cross references but even escaping it with
\'
didn’t work, still breaks the rendering:On command line I get a warn:
If someone knows how to make cross references work with single quotes, following is the adoc file I’m using: