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

Allow "*/" inside commented out shortcodes #4608

Closed
it-gro opened this Issue Apr 11, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@it-gro

it-gro commented Apr 11, 2018

As we discussed in discourse.gohugo.io

Using /* and */ shortcodes can be marked as "not really a shortcode".

This is very useful when documenting shortcodes.
The parser is probably in hugolib/shortcodeparser.go
There is an issues when */ is used as parameter - e.g. in the form of "**/*.pdf"

Not working examples are:

```
foo {{</* sc-inner "*/" /*/>}} bar
```
```
more {{</* sc-inner "*/" >}} 
here 
{{< /sc-inner */>}} end
```
```
foo {{</* sc "*/" */>}} bar
```
```
more {{</* sc "*/" >}} 
here {{< sc "24" */>}} end
```

for all examples we get:
ERROR "comment ends before the right shortcode delimiter"

(replace "*/" with e.g. "42" and you get a working example)

@bep bep added the Bug label Apr 11, 2018

@bep bep added this to the v0.39 milestone Apr 11, 2018

@bep bep changed the title from marking shortcodes as "not really a shortcode" if a param contains */ to Allow "*/" inside commented out shortcodes Apr 11, 2018

@bep bep closed this in 14c35c8 Apr 11, 2018

@it-gro

This comment has been minimized.

it-gro commented Apr 12, 2018

Just a feedback: using hugo-0.39-DEV-F377587 all examples above work as expected.
Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment