SassDoc / sassdoc

Release the docs!
http://sassdoc.com
MIT License
1.41k stars 56 forks source link

Interpolation within param declaration #492

Open boriskaiser opened 7 years ago

boriskaiser commented 7 years ago

Hi guys,

I have a problem with the parameter declaration, which use SASS interpolation. Here is a simple example:

/// Test variable interpolation
/// @param {String} $foo ['foo'] - Foo value
/// @param {String} $foobar ['#{$foo}bar'] - Foo and bar value
@mixin test(
  $foo: 'foo',
  $foobar: '#{$foo}bar'
) {
  body {
    content: $foobar
  }
}

The result of SassDoc looks like this:

image

I noticed, if I remove the {String} type, everything works correctly, see here:

image

Is there a workaround, how to declare the type with interpolation or is it a bug?

PS I use SassDoc 2.2.2.

KittyGiraudel commented 7 years ago

Hi,

This is a bug, and there is no workaround other than finding a syntax that conveys the same meaning without using braces.

Maybe something like:

/// @param {String} $foobar ['($foo)bar'] - Foo and bar value
boriskaiser commented 7 years ago

@HugoGiraudel All right. Thank you for your answer!

boriskaiser commented 7 years ago

@HugoGiraudel Do you already have a ticket for this bug? If so, I would close the ticket.

KittyGiraudel commented 7 years ago

We don’t, leave it open. :)