UNPKG

2.79 kBSource Map (JSON)View Raw
1{"version":3,"file":"DocSoftBreak.js","sourceRoot":"","sources":["../../src/nodes/DocSoftBreak.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qCAA+F;AAE/F,2CAAuD;AAcvD;;;;;;;;;;;;GAYG;AACH;IAAkC,gCAAO;IAGvC;;;OAGG;IACH,sBAAmB,UAAmE;QAAtF,YACE,kBAAM,UAAU,CAAC,SASlB;QAPC,IAAI,iBAAO,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE;YAC1C,KAAI,CAAC,iBAAiB,GAAG,IAAI,uBAAU,CAAC;gBACtC,aAAa,EAAE,KAAI,CAAC,aAAa;gBACjC,WAAW,EAAE,wBAAW,CAAC,SAAS;gBAClC,OAAO,EAAE,UAAU,CAAC,gBAAgB;aACrC,CAAC,CAAC;SACJ;;IACH,CAAC;IAGD,sBAAW,8BAAI;QADf,gBAAgB;aAChB;YACE,OAAO,qBAAW,CAAC,SAAS,CAAC;QAC/B,CAAC;;;OAAA;IAED,gBAAgB;IACN,sCAAe,GAAzB;QACE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAClC,CAAC;IACH,mBAAC;AAAD,CAAC,AA5BD,CAAkC,iBAAO,GA4BxC;AA5BY,oCAAY","sourcesContent":["import { DocNodeKind, IDocNodeParameters, DocNode, IDocNodeParsedParameters } from './DocNode';\r\nimport { TokenSequence } from '../parser/TokenSequence';\r\nimport { DocExcerpt, ExcerptKind } from './DocExcerpt';\r\n\r\n/**\r\n * Constructor parameters for {@link DocSoftBreak}.\r\n */\r\nexport interface IDocSoftBreakParameters extends IDocNodeParameters {}\r\n\r\n/**\r\n * Constructor parameters for {@link DocSoftBreak}.\r\n */\r\nexport interface IDocSoftBreakParsedParameters extends IDocNodeParsedParameters {\r\n softBreakExcerpt: TokenSequence;\r\n}\r\n\r\n/**\r\n * Instructs a renderer to insert an explicit newline in the output.\r\n * (Normally the renderer uses a formatting rule to determine where\r\n * lines should wrap.)\r\n *\r\n * @remarks\r\n * In HTML, a soft break is represented as an ASCII newline character (which does not\r\n * affect the web browser's view), whereas the hard break is the `<br />` element\r\n * (which starts a new line in the web browser's view).\r\n *\r\n * TSDoc follows the same conventions, except the renderer avoids emitting\r\n * two empty lines (because that could start a new CommonMark paragraph).\r\n */\r\nexport class DocSoftBreak extends DocNode {\r\n private readonly _softBreakExcerpt: DocExcerpt | undefined;\r\n\r\n /**\r\n * Don't call this directly. Instead use {@link TSDocParser}\r\n * @internal\r\n */\r\n public constructor(parameters: IDocSoftBreakParameters | IDocSoftBreakParsedParameters) {\r\n super(parameters);\r\n\r\n if (DocNode.isParsedParameters(parameters)) {\r\n this._softBreakExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.SoftBreak,\r\n content: parameters.softBreakExcerpt\r\n });\r\n }\r\n }\r\n\r\n /** @override */\r\n public get kind(): DocNodeKind | string {\r\n return DocNodeKind.SoftBreak;\r\n }\r\n\r\n /** @override */\r\n protected onGetChildNodes(): ReadonlyArray<DocNode | undefined> {\r\n return [this._softBreakExcerpt];\r\n }\r\n}\r\n"]}
\No newline at end of file