utils/node_modules/@microsoft/tsdoc/lib-commonjs/emitters/PlainTextEmitter.js.map

1 line
6.4 KiB
Plaintext
Raw Normal View History

2024-02-07 01:33:07 -05:00
{"version":3,"file":"PlainTextEmitter.js","sourceRoot":"","sources":["../../src/emitters/PlainTextEmitter.ts"],"names":[],"mappings":";;;AAAA,kCAQkB;AAElB;;GAEG;AACH;IAAA;IAkHA,CAAC;IAxFe,kCAAiB,GAA/B,UACE,WAA6C,EAC7C,kBAA2B;QAE3B,IAAI,kBAAkB,KAAK,SAAS,IAAI,kBAAkB,GAAG,CAAC,EAAE;YAC9D,kBAAkB,GAAG,CAAC,CAAC,CAAC,UAAU;SACnC;QAED,IAAI,KAA6B,CAAC;QAClC,IAAI,WAAW,YAAY,eAAO,EAAE;YAClC,KAAK,GAAG,CAAC,WAAW,CAAC,CAAC;SACvB;aAAM;YACL,KAAK,GAAG,WAAW,CAAC;SACrB;QAED,IAAM,eAAe,GAAW,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC;QAEhG,OAAO,eAAe,IAAI,kBAAkB,CAAC;IAC/C,CAAC;IAEc,iCAAgB,GAA/B,UACE,KAA6B,EAC7B,kBAA0B,EAC1B,eAAuB;QAEvB,KAAmB,UAAK,EAAL,eAAK,EAAL,mBAAK,EAAL,IAAK,EAAE;YAArB,IAAM,IAAI,cAAA;YACb,QAAQ,IAAI,CAAC,IAAI,EAAE;gBACjB,KAAK,mBAAW,CAAC,UAAU;oBACzB,IAAM,aAAa,GAAkB,IAAqB,CAAC;oBAC3D,eAAe,IAAI,gBAAgB,CAAC,wBAAwB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;oBACjF,MAAM;gBAER,KAAK,mBAAW,CAAC,QAAQ;oBACvB,IAAM,WAAW,GAAgB,IAAmB,CAAC;oBACrD,eAAe,IAAI,gBAAgB,CAAC,wBAAwB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;oBAC/E,MAAM;gB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D,OAAO,KAAK,CAAC;IACf,CAAC;IACH,uBAAC;AAAD,CAAC,AAlHD,IAkHC;AAlHY,4CAAgB","sourcesContent":["import {\r\n DocNode,\r\n DocNodeKind,\r\n DocPlainText,\r\n DocFencedCode,\r\n DocCodeSpan,\r\n DocLinkTag,\r\n DocEscapedText\r\n} from '../nodes';\r\n\r\n/**\r\n * Renders a DocNode tree as plain text, without any rich text formatting or markup.\r\n */\r\nexport class PlainTextEmitter {\r\n /**\r\n * Returns true if the specified node contains any text content.\r\n *\r\n * @remarks\r\n * A documentation tool can use this test to report warnings when a developer neglected to write a code comment\r\n * for a declaration.\r\n *\r\n * @param node - this node and all its children will be considered\r\n * @param requiredCharacters - The test returns true if at least this many non-spacing characters are found.\r\n * The default value is 1.\r\n */\r\n public static hasAnyTextContent(node: DocNode, requiredCharacters?: number): boolean;\r\n\r\n /**\r\n * Returns true if the specified collection of nodes contains any text content.\r\n *\r\n * @remarks\r\n * A documentation tool can use this test to report warnings when a developer neglected to write a code comment\r\n * for a declaration.\r\n *\r\n * @param nodes - the collection of nodes to be tested\r\n * @param requiredCharacters - The test returns true if at least this many non-spacing characters are found.\r\n * The default value is 1.\r\n */\r\n public static hasAnyTextContent(nodes: ReadonlyArray<DocNode>, requiredCharacters?: number): boolean;\r\n public static hasAnyTextContent(\r\n nodeOrNodes: DocNode | ReadonlyArray<DocNode>,\r\n requiredCharacters?: number\r\n ): boolean {\r\n if (requiredCharacters === undefined || requiredCharacters < 1) {\r\n requiredCharacters = 1; // default\r\n }\r\n\r\n let nodes: ReadonlyArray<DocNode>;\r\n if (nodeOrNodes instanceof DocNode) {\r\n nodes = [nodeOrNodes];\r\n } else {\r\n nodes = nodeOrNodes;\r\n }\r\n\r\n