@ecency/render-helper 2.3.9 → 2.3.10
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/package.json
CHANGED
|
@@ -946,7 +946,7 @@ describe('Markdown2Html', () => {
|
|
|
946
946
|
last_update: '2019-05-10T09:15:21',
|
|
947
947
|
body: 'this is link https://inleo.io/@godfish/close-range-reflections'
|
|
948
948
|
}
|
|
949
|
-
const expected = '<p dir=\"auto\">this is link <a href="/post/@godfish/close-range-reflections" class="markdown-post-link">@godfish/close-range-reflections</a></p>'
|
|
949
|
+
const expected = '<p dir=\"auto\">this is link <a href="/post/@godfish/close-range-reflections" class="markdown-post-link" data-is-inline="false">@godfish/close-range-reflections</a></p>'
|
|
950
950
|
|
|
951
951
|
expect(markdown2Html(input, false)).toBe(expected)
|
|
952
952
|
})
|
|
@@ -1161,7 +1161,7 @@ describe('Markdown2Html', () => {
|
|
|
1161
1161
|
last_update: '2019-05-10T09:15:21',
|
|
1162
1162
|
body: 'https://img.esteem.ws/bbq3ob1idy.png <a href="https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4">fooo</a> <a href="/esteem/@esteemapp/esteem-monthly-guest-curation-program-4">bar</a> <a href="http://external.com/loromoro">baz</a> #lorem @ipsum <a href=\'https://steemit.com/~witnesses\'>vote me</a>'
|
|
1163
1163
|
}
|
|
1164
|
-
const expected = '<p dir=\"auto\"><img class="markdown-img-link" src="https://images.ecency.com/p/o1AJ9qDyyJNSpZWhUgGYc3MngFqoAMwgbeMkkd8SVxyfRVjiN.png?format=match&mode=fit" loading="lazy" decoding="async" itemprop="image" /> <a href="https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4" class="markdown-external-link" target="_blank" rel="noopener">fooo</a> <a href="/esteem/@esteemapp/esteem-monthly-guest-curation-program-4" class="markdown-post-link">bar</a> <a href="http://external.com/loromoro" class="markdown-external-link" target="_blank" rel="noopener">baz</a><span> <a class="markdown-tag-link" href="/trending/lorem">#lorem</a> <a class="markdown-author-link" href="/@ipsum">@ipsum</a> </span><a href="https://steemit.com/~witnesses" class="markdown-external-link" target="_blank" rel="noopener">vote me</a></p>'
|
|
1164
|
+
const expected = '<p dir=\"auto\"><img class="markdown-img-link" src="https://images.ecency.com/p/o1AJ9qDyyJNSpZWhUgGYc3MngFqoAMwgbeMkkd8SVxyfRVjiN.png?format=match&mode=fit" loading="lazy" decoding="async" itemprop="image" /> <a href="https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4" class="markdown-external-link" target="_blank" rel="noopener">fooo</a> <a href="/esteem/@esteemapp/esteem-monthly-guest-curation-program-4" class="markdown-post-link" data-is-inline="true">bar</a> <a href="http://external.com/loromoro" class="markdown-external-link" target="_blank" rel="noopener">baz</a><span> <a class="markdown-tag-link" href="/trending/lorem">#lorem</a> <a class="markdown-author-link" href="/@ipsum">@ipsum</a> </span><a href="https://steemit.com/~witnesses" class="markdown-external-link" target="_blank" rel="noopener">vote me</a></p>'
|
|
1165
1165
|
|
|
1166
1166
|
expect(markdown2Html(input, false)).toBe(expected)
|
|
1167
1167
|
})
|
package/src/methods/a.method.ts
CHANGED
|
@@ -121,6 +121,7 @@ export function a(el: HTMLElement, forApp: boolean, webp: boolean): void {
|
|
|
121
121
|
} else {
|
|
122
122
|
const h = `/${tag}/@${author}/${permlink}`
|
|
123
123
|
el.setAttribute('href', h)
|
|
124
|
+
el.setAttribute('data-is-inline', '' + isInline)
|
|
124
125
|
}
|
|
125
126
|
return
|
|
126
127
|
}
|
|
@@ -208,6 +209,7 @@ export function a(el: HTMLElement, forApp: boolean, webp: boolean): void {
|
|
|
208
209
|
} else {
|
|
209
210
|
const h = `/${tag}/@${author}/${permlink}`
|
|
210
211
|
el.setAttribute('href', h)
|
|
212
|
+
el.setAttribute('data-is-inline', '' + isInline)
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
return
|
|
@@ -286,6 +288,7 @@ export function a(el: HTMLElement, forApp: boolean, webp: boolean): void {
|
|
|
286
288
|
} else {
|
|
287
289
|
const h = `/${tag}/@${author}/${permlink}`
|
|
288
290
|
el.setAttribute('href', h)
|
|
291
|
+
el.setAttribute('data-is-inline', '' + isInline)
|
|
289
292
|
}
|
|
290
293
|
|
|
291
294
|
return
|
|
@@ -391,6 +394,7 @@ export function a(el: HTMLElement, forApp: boolean, webp: boolean): void {
|
|
|
391
394
|
} else {
|
|
392
395
|
const h = `/${tag}/@${author}/${permlink}`
|
|
393
396
|
el.setAttribute('href', h)
|
|
397
|
+
el.setAttribute('data-is-inline', '' + isInline)
|
|
394
398
|
}
|
|
395
399
|
return
|
|
396
400
|
}
|