Skip to content

Commit 11505ae

Browse files
authored
Fix/overview license (#20)
* updated package json * change titles
1 parent 091c0ce commit 11505ae

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solarity/hardhat-markup",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Customizable markdown smart contracts documentation",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",

src/generator/md-generator/MDGenerator.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ContractInfo, Documentation, DocumentationBlock, NatSpecDocumentation } from "../../parser/types";
2-
import { CONTRACT_NAME_H_SIZE, FUNCTION_NAME_H_SIZE } from "./constants";
2+
import { CONTRACT_NAME_H_SIZE, FUNCTION_NAME_H_SIZE, LICENSE_H_SIZE } from "./constants";
33
import { MDFactory } from "./MDFactory";
44

55
export class MDGenerator {
@@ -11,12 +11,8 @@ export class MDGenerator {
1111
const mdFactory: MDFactory = new MDFactory();
1212

1313
mdFactory.addHeaderTag(contractInfo.name, CONTRACT_NAME_H_SIZE);
14-
mdFactory.addHeaderTag(
15-
`${contractInfo.isAbstract ? "Abstract " : ""}${this.capitalizeFirstLetter(
16-
contractInfo.contractKind
17-
)} Description`
18-
);
19-
mdFactory.addParagraphTag(`License: ${contractInfo.license}`);
14+
mdFactory.addHeaderTag("Overview");
15+
mdFactory.addHeaderTag(`License: ${contractInfo.license}`, LICENSE_H_SIZE);
2016

2117
contractInfo.documentations.forEach((blockInfos) => {
2218
this.generateBlockInfo(mdFactory, blockInfos);

src/generator/md-generator/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const CONTRACT_NAME_H_SIZE = 1;
99
export const TOPIC_H_SIZE = 2;
1010
export const FUNCTION_NAME_H_SIZE = 3;
1111
export const FUNCTION_INSIDE_H_SIZE = 4;
12+
export const LICENSE_H_SIZE = 4;
1213
export const DEFAULT_CODE_LANGUAGE = "solidity";
1314
export const DEFAULT_TABLE_ALIGN = AlignTypes.LEFT;
1415
export const FULL_METHOD_SIGN_MAX_LENGTH = 99;

0 commit comments

Comments
 (0)