securemark 0.283.1 → 0.283.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.js +88 -50
- package/package.json +1 -1
- package/src/combinator/control/manipulation/indent.ts +1 -1
- package/src/combinator/data/parser/context/delimiter.ts +28 -3
- package/src/combinator/data/parser/context.ts +5 -2
- package/src/parser/block/dlist.ts +1 -1
- package/src/parser/context.ts +6 -6
- package/src/parser/inline/annotation.ts +2 -2
- package/src/parser/inline/autolink/url.ts +2 -2
- package/src/parser/inline/autolink.ts +1 -1
- package/src/parser/inline/bracket.ts +17 -14
- package/src/parser/inline/code.ts +1 -1
- package/src/parser/inline/deletion.ts +1 -1
- package/src/parser/inline/emphasis.test.ts +2 -2
- package/src/parser/inline/emphasis.ts +3 -3
- package/src/parser/inline/emstrong.ts +7 -7
- package/src/parser/inline/extension/index.ts +3 -3
- package/src/parser/inline/extension/indexee.ts +4 -2
- package/src/parser/inline/extension/placeholder.ts +2 -2
- package/src/parser/inline/html.ts +4 -4
- package/src/parser/inline/htmlentity.ts +5 -5
- package/src/parser/inline/insertion.ts +1 -1
- package/src/parser/inline/link.ts +4 -4
- package/src/parser/inline/mark.test.ts +2 -2
- package/src/parser/inline/mark.ts +3 -3
- package/src/parser/inline/math.ts +2 -2
- package/src/parser/inline/media.ts +2 -2
- package/src/parser/inline/reference.ts +2 -2
- package/src/parser/inline/remark.ts +2 -2
- package/src/parser/inline/ruby.ts +2 -2
- package/src/parser/inline/strong.test.ts +2 -2
- package/src/parser/inline/strong.ts +3 -3
- package/src/parser/inline/template.ts +2 -2
- package/src/parser/inline.test.ts +4 -2
- package/src/parser/visibility.ts +4 -4
package/src/parser/visibility.ts
CHANGED
|
@@ -120,7 +120,7 @@ export function isStartTightNodes(nodes: readonly (HTMLElement | string)[]): boo
|
|
|
120
120
|
}
|
|
121
121
|
//export function isEndTightNodes(nodes: readonly (HTMLElement | string)[]): boolean {
|
|
122
122
|
// if (nodes.length === 0) return true;
|
|
123
|
-
// return isVisible(nodes
|
|
123
|
+
// return isVisible(nodes.at(-1)!, -1);
|
|
124
124
|
//}
|
|
125
125
|
function isVisible(node: HTMLElement | string, strpos?: number): boolean {
|
|
126
126
|
switch (typeof node) {
|
|
@@ -186,11 +186,11 @@ function trimBlankEnd<T extends HTMLElement | string>(parser: Parser<T>): Parser
|
|
|
186
186
|
//}
|
|
187
187
|
export function trimNodeEnd<T extends HTMLElement | string>(nodes: T[]): T[] {
|
|
188
188
|
const skip = nodes.length > 0 &&
|
|
189
|
-
typeof nodes
|
|
190
|
-
nodes
|
|
189
|
+
typeof nodes.at(-1) === 'object' &&
|
|
190
|
+
nodes.at(-1)!['className'] === 'indexer'
|
|
191
191
|
? [nodes.pop()!]
|
|
192
192
|
: [];
|
|
193
|
-
for (let node = nodes[0]; nodes.length > 0 && !isVisible(node = nodes
|
|
193
|
+
for (let node = nodes[0]; nodes.length > 0 && !isVisible(node = nodes.at(-1)!, -1);) {
|
|
194
194
|
if (typeof node === 'string') {
|
|
195
195
|
const pos = node.trimEnd().length;
|
|
196
196
|
if (pos > 0) {
|