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

Section hierarchy is wrong when section text starts with number #307

Closed
luisfcorreia opened this issue Dec 12, 2023 · 2 comments
Closed

Comments

@luisfcorreia
Copy link
Contributor

Hi,

during our new iteration on generating a PDF for documentation, we discovered if a section starts with a number, the converter/generator considers it as a section number, not a section title.

Most specifically, if a Feature name starts with a number...

We're creating the PDF from code, using along many other things cukedoctor-converter

The error occours in this line

=== 9003-GPOC

if we add any other caracter before, no error occours

=== º9003-GPOC

The following is an edited .adoc intermediate file:


:toc: left
:backend: pdf
:doctitle: XPTO - Documentação
:doctype: book
:icons: font
:numbered:
:sectanchors:
:sectlink:
:docinfo:
:source-highlighter: highlightjs
:toclevels: 3
:revnumber: 0.0.2-FORMACAO-XPTO
:hardbreaks:
:chapter-label: Chapter
:version-label: Versão
:!allow-uri-read:
:!data-uri:

= *XPTO - Documentação*

:toc-title: Índice
:data-uri: 
:imagesdir: 
:outlinelevels: 3

= *XPTO* - *Formação*

WARNING: DEMOnstração

== Introdução

Pseudo-projecto usado para formação de automação de testes

== *Funcionalidades*

[[9003-GPOC-Uso-da-tag-no-doc---Teste-1, 9003-GPOC-Uso da tag no-doc - Teste 1]]
=== 9003-GPOC-Uso da tag no-doc - Teste 1* 
****
TIP: *Como* administrador do Showcase do projeto XPTO
*Quero* realizar o registo de férias para data pretendida
*Para* o pedido ser registado na base de dados
****

==== Cenário: Registar um pedido de férias (Cenario 2)

****
Dado ::
==========

que sou administrador do Showcase do projeto XPTO
==========

E ::
==========

estou autenticado
==========

Quando ::
==========

registo o pedido de férias para data pretendida
==========

Então ::
==========

o pedido férias é registado na base de dados
==========

****

NOTE: this was previously also opened in asciidoctorj-pdf as an issue asciidoctor/asciidoctorj-pdf#98

@luisfcorreia
Copy link
Contributor Author

luisfcorreia commented Dec 12, 2023

Adding a bit into the issue, a friend just suggested the following, adding newlines in specific places prevents the error from occouring and follows asciidoc specification.

An AsciiDoc document is a series of blocks stacked on top of one another (by line). These blocks are typically offset from one another by empty lines (though these may be optional in certain circumstances).

Apparently cukedoctor-converter isn't following this convention (empty lines between blocks).

I've went through the code myself but can't figure out how to add lines in "public CukedoctorConverter renderFeatures(List features)"


[[9003-GPOC-Uso-da-tag-no-doc---Teste-1, 9003-GPOC-Uso da tag no-doc - Teste 1]]

=== 9003-GPOC-Uso da tag no-doc - Teste 1* 

****
TIP: *Como* administrador do Showcase do projeto XPTO
*Quero* realizar o registo de férias para data pretendida
*Para* o pedido ser registado na base de dados
****

@luisfcorreia
Copy link
Contributor Author

Closing as problem was found ans it not related to this project

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

No branches or pull requests

1 participant