-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
include::
in asciidoctor vs. gollum
#1912
Comments
include::
in asciidoctor vs. gollum
We'd definitely like gollum to be as compatible as possible with asciidoctor. Can you elaborate on how adding |
I'm by no means an asciidoctor expert, just a user ;). In this paragraph of the asciidoctor docs it's written that reserved characters need to be encoded in links. In this paragraph the escaping in context of the Passthroughs are "for passing chunks of content directly through to the output". So, in the case of gollum outputting to HTML, the target is preserved including spaces in the resulting |
Could you provide us with a minimal example that we can inspect? |
This does not seem to be something that gollum is doing. Could it be that |
Ping @asprionj could you provide us with some more information (see comments above)? |
Sorry for the long silence. Trying to come up with an MWE, and looking at the github-markup way of calling asciidoctor, had me start playing with some things. I actually found the problem. But first, a clarification: In gollum, it would be nice to replace adoc's Now, I assumed that this feature has been implemented in gollumn but is still buggy. However, the only reason So, for this to work as I explained above, the substitution would have to take place before even passing the source content to the markup converter (asciidoctor, in this case). So it would have to be done by gollum itself, I assume. What are your thoughts on this? [I do know that I'm trying to "misuse" gollum as web-based editor for something that is usually done in a local editor/IDE (actually, I do use VSCode). It would just be a nice way to make editing and/or file-wise viewing (i.e. behaviour as a Wiki) of a topics-based documentation (or "file-generation") system accessible to non-nerds within the same company.] |
I understand the issue now. I am almost inclined to call this a bug in asciidoctor, as there seems to be no way to write It looks like asciidoctor has consciously decided to allow spaces in links (against the AsciiDoc spec): asciidoctor/asciidoctor#798 (comment) Perhaps it's worth asking if they feel the should support the case of an include with spaces in the filename rendered in safe mode? If not, the best bet for gollum may be to write some kind of custom extension for asciidoc. |
Opened an issue with asciidoc here: asciidoctor/asciidoctor#4461 |
This has been fixed in asciidoctor asciidoctor/asciidoctor#4461, |
I have (multiple) large asciidoctor docs using recursive
include::
statements to separate the docs into multiple files structured in a folder structure. Just using gollum on the local checkout of such a repo basically works, but it does not resolve theinclude::
s correctly. In asciidoctor, aninclude::
can have spaces, and replacing them with either%20
or the character ID 
does not work.gollum seems to convert
include::
statements on the fly tolink:<target>[role=include]
statements. However, alink:
cannot have spaces in it, so the links are broken. One solution could be to use apass:
to wrap the (possibly) space-containing target from theinclude::
:link:pass:[<target>][role=include]
. This works in some manual tests and would allow to have recursively modularised docs being processed/shown correctly both in asciidoctor and gollum at the same time.The text was updated successfully, but these errors were encountered: