Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/markdown-it-emoji/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
},
"dependencies": {
"@types/markdown-it": "*"
"@types/markdown-it": "^14"
},
"devDependencies": {
"@types/markdown-it-emoji": "workspace:."
Expand Down
1 change: 1 addition & 0 deletions types/markdown-it/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
!**/*.d.cts
!**/*.d.mts
!**/*.d.*.ts
/v13/
4 changes: 2 additions & 2 deletions types/markdown-it/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
}
},
"dependencies": {
"@types/linkify-it": "*",
"@types/mdurl": "*"
"@types/linkify-it": "^5",
"@types/mdurl": "^2"
Comment on lines +19 to +20
Copy link
Copy Markdown
Member

@jakebailey jakebailey May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
"devDependencies": {
"@types/markdown-it": "workspace:."
Expand Down
5 changes: 5 additions & 0 deletions types/markdown-it/v13/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!**/*.d.ts
!**/*.d.cts
!**/*.d.mts
!**/*.d.*.ts
5 changes: 5 additions & 0 deletions types/markdown-it/v13/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import MarkdownIt = require("./lib");

export as namespace markdownit;

export = MarkdownIt;
7 changes: 7 additions & 0 deletions types/markdown-it/v13/lib/common/entities.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
interface MapType {
[key: string]: string;
}

declare const entities: MapType;

export = entities;
3 changes: 3 additions & 0 deletions types/markdown-it/v13/lib/common/html_blocks.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare const htmlBlocks: string[];

export = htmlBlocks;
8 changes: 8 additions & 0 deletions types/markdown-it/v13/lib/common/html_re.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
interface HtmlRE {
HTML_TAG_RE: RegExp;
HTML_OPEN_CLOSE_TAG_RE: RegExp;
}

declare const htmlRE: HtmlRE;

export = htmlRE;
70 changes: 70 additions & 0 deletions types/markdown-it/v13/lib/common/utils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import * as mdurl from "mdurl";
// import ucmicro from 'uc.micro';

interface Utils {
lib: {
mdurl: typeof mdurl;
};

/**
* Merge objects
*/
assign(target: any, ...sources: any[]): any;

/**
* Check if the type is string or not
*/
isString(obj: any): obj is string;

/**
* has own property
*/
has(obj: any, key: keyof any): boolean;

unescapeMd(str: string): string;
unescapeAll(str: string): string;

isValidEntityCode(code: number): boolean;
fromCodePoint(code: number): string;
escapeHtml(str: string): string;

/**
* Remove element from array and put another array at those position.
* Useful for some operations with tokens.
* Return a new array.
*/
arrayReplaceAt<T>(src: T[], pos: number, newElements: T[]): T[];

isSpace(code: number): boolean;

/**
* Zs (unicode class) || [\t\f\v\r\n]
*/
isWhiteSpace(code: number): boolean;

/**
* Markdown ASCII punctuation characters.
*
* !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
* http://spec.commonmark.org/0.15/#ascii-punctuation-character
*
* Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
*/
isMdAsciiPunct(code: number): boolean;

/**
* Currently without astral characters support.
*/
isPunctChar(ch: string): boolean;

escapeRE(str: string): string;

/**
* Hepler to unify [reference labels].
*/
normalizeReference(str: string): string;
}

declare const utils: Utils;

export = utils;
13 changes: 13 additions & 0 deletions types/markdown-it/v13/lib/helpers/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import parseLinkLabel = require("./parse_link_label");
import parseLinkDestination = require("./parse_link_destination");
import parseLinkTitle = require("./parse_link_title");

interface Helpers {
parseLinkLabel: typeof parseLinkLabel;
parseLinkDestination: typeof parseLinkDestination;
parseLinkTitle: typeof parseLinkTitle;
}

declare const helpers: Helpers;

export = helpers;
12 changes: 12 additions & 0 deletions types/markdown-it/v13/lib/helpers/parse_link_destination.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare namespace parseLinkDestination {
interface ParseResult {
ok: boolean;
pos: number;
lines: number;
str: string;
}
}

declare function parseLinkDestination(str: string, pos: number, max: number): parseLinkDestination.ParseResult;

export = parseLinkDestination;
5 changes: 5 additions & 0 deletions types/markdown-it/v13/lib/helpers/parse_link_label.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import StateInline = require("../rules_inline/state_inline");

declare function parseLinkLabel(state: StateInline, start: number, disableNested?: boolean): number;

export = parseLinkLabel;
5 changes: 5 additions & 0 deletions types/markdown-it/v13/lib/helpers/parse_link_title.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Destination = require("./parse_link_destination");

declare function parseLinkTitle(str: string, pos: number, max: number): Destination.ParseResult;

export = parseLinkTitle;
Loading