maria-docs team mailing list archive
-
maria-docs team
-
Mailing list archive
-
Message #00380
Re: TOC link doesn't work if a heading doesn't include ASCII alphanumerics
On Thu, Jul 16, 2015 at 2:39 AM, 100の人 <100@xxxxxxxxxxx> wrote:
> A link in a table of contents generated by <<toc>> macro doesn't work if its
> corresponding heading doesn't include ASCII alphanumerics.
> The reason is that characters that can not be converted into ASCII
> alphanumerics are treated as spaces in headings.
> If a heading only includes the characters, its "id" attribute is an empty
> string.
> For example, this page:
> https://mariadb.com/kb/zh-cn/getting-started-with-indexes/
>
> As of now, a editor need to append an extra <<style>> macro to avoid the
> dead link.
> For example: "== 第一章 <<style style="content: 'Heading One';">> <</style>>"
> (https://mariadb.com/kb/ja/toc/)
>
> I think a possible solution would be to treat some non-ASCII characters as
> ASCII alphanumerics.
> For example, "== 第一章" would be converted to "<h2 id="第一章">第一章</h2>".
> The character probably can be expressed by this regular expression:
> /[\p{Cyrillic}\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]/
I'll forward this on to the web team. Hopefully they'll be able to get
it fixed soon. Thanks for reporting it!
--
Daniel Bartholomew, MariaDB Release Manager
MariaDB | http://mariadb.com
Follow ups
References