Skip to content

Gitbook not rendering @dev properly #26

@decafboba

Description

@decafboba

When using gitbook with dodoc, it seems the @dev is rendered improperly. For example:

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

creates:

:::note Details Returns the address of the current owner.
:::

Tried with /// instead of /* */ and still no dice.

image

Also using the same docusaurus.sql as Primitive:

---
description: {{@if (it.title)}}{{it.title}}{{/if}}

---

{{@if (it.name)}}# {{it.name}}.sol{{/if}}


{{@if (it.notice)}}{{it.notice}}{{/if}}


{{@if (it.details)}}
:::note Details
{{it.details}}

:::
{{/if}}


{{@if (Object.keys(it.methods).length > 0)}}
## Methods

{{@foreach(it.methods) => key, val}}
### {{key}}


{{@if (val.notice)}}{{val.notice}}{{/if}}

solidity title="Solidity"
{{val.code}}



{{@if (val.details)}}
:::note Details
{{val.details}}

:::
{{/if}}


{{@if (Object.keys(val.inputs).length > 0)}}
#### Parameters

| Name | Type | Description |
|---|---|---|
{{@foreach(val.inputs) => key, val}}
| {{key}} | {{val.type}} | {{val.description}}

{{/foreach}}
{{/if}}

{{@if (Object.keys(val.outputs).length > 0)}}
#### Returns

| Name | Type | Description |
|---|---|---|
{{@foreach(val.outputs) => key, val}}
| {{key}} | {{val.type}} | {{val.description}}

{{/foreach}}

{{/if}}
{{/foreach}}

{{/if}}

{{@if (Object.keys(it.events).length > 0)}}
## Events

{{@foreach(it.events) => key, val}}
### {{key}}


{{@if (val.notice)}}{{val.notice}}{{/if}}


solidity title="Solidity"
{{val.code}}

{{@if (val.details)}}
:::note Details
{{val.details}}

:::
{{/if}}


{{@if (Object.keys(val.inputs).length > 0)}}
#### Parameters

| Name | Type | Description |
|---|---|---|
{{@foreach(val.inputs) => key, val}}
| {{key}} {{@if (val.indexed)}}`indexed`{{/if}} | {{val.type}} | {{val.description}} |
{{/foreach}}
{{/if}}

{{/foreach}}

{{/if}}

{{@if (Object.keys(it.errors).length > 0)}}
## Errors

{{@foreach(it.errors) => key, val}}
### {{key}}


{{@if (val.notice)}}{{val.notice}}{{/if}}


solidity title="Solidity"
{{val.code}}


{{@if (val.details)}}
:::note Details
{{val.details}}

:::
{{/if}}


{{@if (Object.keys(val.inputs).length > 0)}}
#### Parameters

| Name | Type | Description |
|---|---|---|
{{@foreach(val.inputs) => key, val}}
| {{key}} | {{val.type}} | {{val.description}} |
{{/foreach}}
{{/if}}

{{/foreach}}

{{/if}}

Any idea how to work around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions