htl-spec icon indicating copy to clipboard operation
htl-spec copied to clipboard

The scheme option description unclear

Open karollewandowski opened this issue 4 years ago • 0 comments

It states:

scheme - allows adding or removing the scheme part for a URI

${'//example.com/path/page.html' @ scheme='http'}
<!-- outputs: http://example.com/path/page.html -->

${'http://example.com/path/page.html' @ scheme='https'}
<!-- outputs: https://example.com/path/page.html -->

${'http://example.com/path/page.html' @ scheme=''}
<!-- outputs: http://example.com/path/page.html -->

${'http://example.com/path/page.html' @ scheme}
<!-- outputs: http://example.com/path/page.html -->

It looks like it doesn't remove scheme, even in examples above. I checked Sightly implementation and it also doesn't remove scheme. I assume that removed scheme means the following output:

${'http://example.com/path/page.html' @ scheme=''}
<!-- outputs: //example.com/path/page.html -->

Could you please clarify it?

karollewandowski avatar Jun 04 '20 16:06 karollewandowski