How to escape square brackets in asciidoctor video file name?

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

How to escape square brackets in asciidoctor video file name?

documentationchronicles
Hi there. I am trying to escape square brackets in my asciidoctor video filename. I tried Passthrough(++) but browser still cannot find file.

This works:
video::testvideo.mkv[start=03:55,end=04:05,height=400]

This doesn't work:
video::testvideo[a].mkv[start=03:55,end=04:05,height=400]

With passthrough,still doesn't work:
video::++testvideo[a].mkv++[start=03:55,end=04:05,height=400]
Reply | Threaded
Open this post in threaded view
|

Re: How to escape square brackets in asciidoctor video file name?

mojavelinux
Administrator
You can either use the startsb attribute:

video::testvideo{startsb}a].mkv[start=03:55,end=04:05,height=400]

or URL encode the character:

video::testvideo%5Ba].mkv[start=03:55,end=04:05,height=400]

> With passthrough,still doesn't work:

The passthrough declaration is not recognized in this context.

Best Regards,

-Dan

On Sat, May 16, 2020 at 2:13 AM documentationchronicles [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi there. I am trying to escape square brackets in my asciidoctor video filename. I tried Passthrough(++) but browser still cannot find file.

This works:
video::testvideo.mkv[start=03:55,end=04:05,height=400]

This doesn't work:
video::testvideo[a].mkv[start=03:55,end=04:05,height=400]

With passthrough,still doesn't work:
video::++testvideo[a].mkv++[start=03:55,end=04:05,height=400]


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-escape-square-brackets-in-asciidoctor-video-file-name-tp8005.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: How to escape square brackets in asciidoctor video file name?

programandala.net
In reply to this post by documentationchronicles
2020-05-16 01:13: documentationchronicles [via Asciidoctor ::
Discussion] escribió/skribis/wrote/scrit:

> This doesn't work:
> video::testvideo[a].mkv[start=03:55,end=04:05,height=400]
>
> With passthrough,still doesn't work:
> video::++testvideo[a].mkv++[start=03:55,end=04:05,height=400]

The only such usage of `++` I see in the documentation is for escaping a
URL used as a link parameter. Not sure whether this is the same case.

Though the brackets are not punctuation, you con try a backslash to
escape them:

  video::testvideo\[a].mkv[start=03:55,end=04:05,height=400]

As the target format is HTML, you can try also encoding the brackets
with the usual URL hex notation:
 
  video::testvideo%5Ba%5D.mkv[start=03:55,end=04:05,height=400]

Hope this helps. I didn't tested.

--
Marcos Cruz
http://programandala.net
Reply | Threaded
Open this post in threaded view
|

Re: How to escape square brackets in asciidoctor video file name?

mojavelinux
Administrator
On Sat, May 16, 2020 at 2:46 AM programandala.net [via Asciidoctor :: Discussion] <[hidden email]> wrote:

The only such usage of `++` I see in the documentation is for escaping a
URL used as a link parameter. Not sure whether this is the same case.

That's because a link is an inline macro. You cannot use a passthrough in the target of a block macro.
 

Though the brackets are not punctuation, you con try a backslash to
escape them:

  video::testvideo\[a].mkv[start=03:55,end=04:05,height=400]

Backslashes are not recognized in the target of a block macro.
 

As the target format is HTML, you can try also encoding the brackets
with the usual URL hex notation:
 
  video::testvideo%5Ba%5D.mkv[start=03:55,end=04:05,height=400]

This is the correct solution, as is using {startsb} (and if you want, {endsb}).

Best Regards,

-Dan

--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux