mirror of
https://github.com/docmost/docmost.git
synced 2026-06-15 22:48:42 +08:00
Compare commits
7 Commits
dbe6c2d6ba
..
a11y-1
| Author | SHA1 | Date | |
|---|---|---|---|
| e4c3d06a08 | |||
| 8aa45815f4 | |||
| 660eb4a944 | |||
| 0fdd7ef6d6 | |||
| 1586f4be13 | |||
| 6fdab5fe70 | |||
| fadeeaa59d |
@@ -62,14 +62,14 @@ function applyMarkToYFragment(
|
|||||||
) {
|
) {
|
||||||
let pos = 0;
|
let pos = 0;
|
||||||
|
|
||||||
const processItem = (item: any, parentNodeName?: string): boolean => {
|
const processItem = (item: any): boolean => {
|
||||||
if (pos >= to) return false;
|
if (pos >= to) return false;
|
||||||
|
|
||||||
if (item instanceof Y.XmlText) {
|
if (item instanceof Y.XmlText) {
|
||||||
const textLength = item.length;
|
const textLength = item.length;
|
||||||
const itemEnd = pos + textLength;
|
const itemEnd = pos + textLength;
|
||||||
|
|
||||||
if (itemEnd > from && pos < to && parentNodeName !== 'codeBlock') {
|
if (itemEnd > from && pos < to) {
|
||||||
const formatFrom = Math.max(0, from - pos);
|
const formatFrom = Math.max(0, from - pos);
|
||||||
const formatTo = Math.min(textLength, to - pos);
|
const formatTo = Math.min(textLength, to - pos);
|
||||||
const formatLength = formatTo - formatFrom;
|
const formatLength = formatTo - formatFrom;
|
||||||
@@ -82,7 +82,7 @@ function applyMarkToYFragment(
|
|||||||
} else if (item instanceof Y.XmlElement) {
|
} else if (item instanceof Y.XmlElement) {
|
||||||
pos++; // Opening tag
|
pos++; // Opening tag
|
||||||
for (let i = 0; i < item.length; i++) {
|
for (let i = 0; i < item.length; i++) {
|
||||||
if (!processItem(item.get(i), item.nodeName)) return false;
|
if (!processItem(item.get(i))) return false;
|
||||||
}
|
}
|
||||||
pos++; // Closing tag
|
pos++; // Closing tag
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,10 +112,7 @@ export class EnvironmentService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAwsS3ForcePathStyle(): boolean {
|
getAwsS3ForcePathStyle(): boolean {
|
||||||
const forcePathStyle = this.configService
|
return this.configService.get<boolean>('AWS_S3_FORCE_PATH_STYLE');
|
||||||
.get<string>('AWS_S3_FORCE_PATH_STYLE', 'false')
|
|
||||||
.toLowerCase();
|
|
||||||
return forcePathStyle === 'true';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getAwsS3Url(): string {
|
getAwsS3Url(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user