Section without a title

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Section without a title

Sylvain Leroux
Hi,

I'm investigating various AsciiDoc edge cases.
Is the following document valid?


== 


The title is missing above

(notice there is a space (\0x20) after the `==`)
my asciidoctor-based website: https://yesik.it
Reply | Threaded
Open this post in threaded view
|

Re: Section without a title

mojavelinux
Administrator
No, this is not valid. The reason it is not valid is that the first thing that is done to any AsciiDoc document is to remove trailing spaces from all lines (called normalization). So it's not possible to make trailing spaces significant.

However, the following is valid:

== {blank}

Do not, however, that the built-in HTML converter creates an empty heading tag with an empty id in this case.

Best Regards,

-Dan

On Thu, Jan 28, 2021 at 1:53 AM Sylvain Leroux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I'm investigating various AsciiDoc edge cases.
Is the following document valid?

== 


The title is missing above

(notice there is a space (\0x20) after the `==`)
my asciidoctor-based website: https://yesik.it



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Section-without-a-title-tp8466.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Section without a title

Sylvain Leroux
Thanks,

(emphasis mine)

mojavelinux wrote
 the first thing that is done to any AsciiDoc document is to remove trailing spaces from all lines (called normalization). So it's not possible to make trailing spaces significant.
Is this normalization part of the "specs" -- or is this an implementation detail?

----

I also managed to have a "blank" title using a non-breaking space (u+00a0) after the plain space in the section title.

I assume the normalization process only removes space and tab in the current implementation. If I remember it well, you said elsewhere only these two characters should be considered as spaces. But not all the white spaces as defined by Unicode (see the https://unicode.org/reports/tr44/#White_Space). Or am I wrong here?
my asciidoctor-based website: https://yesik.it
Reply | Threaded
Open this post in threaded view
|

Re: Section without a title

mojavelinux
Administrator
> Is this normalization part of the "specs" -- or is this an implementation detail?

Part of the spec.

It's a long standing issue to add this information to the documentation. See https://github.com/asciidoctor/asciidoctor.org/issues/181. That definitely needs to be prioritized now that we have split off the docs for the language.

> I also managed to have a "blank" title using a non-breaking space (u+00a0) after the plain space in the section title.

Non-breaking spaces should not be used as space characters in the AsciiDoc syntax. If a processor chooses to allow them (perhaps for compatibility reasons, it's an extension to the spec).

> I assume the normalization process only removes space and tab in the current implementation

That's correct. Because when we say spaces in AsciiDoc, those are the only characters that are included.

Supporting all space characters as defined in Unicode violates the "ASCII" spirit of AsciiDoc. And when I say that, I mean that the core markup is restricted to using ASCII characters (the user is free to use Unicode for content).

Best Regards,

-Dan

On Thu, Jan 28, 2021 at 2:19 AM Sylvain Leroux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks,

(emphasis mine)

mojavelinux wrote
 the first thing that is done to any AsciiDoc document is to remove trailing spaces from all lines (called normalization). So it's not possible to make trailing spaces significant.
Is this normalization part of the "specs" -- or is this an implementation detail?

----

I also managed to have a "blank" title using a non-breaking space (u+00a0) after the plain space in the section title.

I assume the normalization process only removes space and tab in the current implementation. If I remember it well, you said elsewhere only these two characters should be considered as spaces. But not all the white spaces as defined by Unicode (see the https://unicode.org/reports/tr44/#White_Space). Or am I wrong here?
my asciidoctor-based website: https://yesik.it



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Section-without-a-title-tp8466p8468.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Section without a title

Sylvain Leroux
Thanks.

I will stick to the 32-127 character range for all the markup.
my asciidoctor-based website: https://yesik.it