feat: Initial clean release of CHM
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
这个提交包含在:
@@ -0,0 +1,73 @@
|
||||
// Stores information about the current content of the user's selection
|
||||
export interface MutableSelectionFormatting {
|
||||
bolded: boolean;
|
||||
italicized: boolean;
|
||||
inChecklist: boolean;
|
||||
inCode: boolean;
|
||||
inUnorderedList: boolean;
|
||||
inOrderedList: boolean;
|
||||
inMath: boolean;
|
||||
inLink: boolean;
|
||||
spellChecking: boolean;
|
||||
unspellCheckableRegion: boolean;
|
||||
|
||||
// Link data, both fields are null if not in a link.
|
||||
linkData: {
|
||||
readonly linkText: string|null;
|
||||
readonly linkURL: string|null;
|
||||
};
|
||||
|
||||
// If [headerLevel], [listLevel], etc. are zero, then the
|
||||
// selection isn't in a header/list
|
||||
headerLevel: number;
|
||||
listLevel: number;
|
||||
|
||||
// Content of the selection
|
||||
selectedText: string;
|
||||
}
|
||||
type SelectionFormatting = Readonly<MutableSelectionFormatting>;
|
||||
export default SelectionFormatting;
|
||||
|
||||
export const defaultSelectionFormatting: SelectionFormatting = {
|
||||
bolded: false,
|
||||
italicized: false,
|
||||
inChecklist: false,
|
||||
inCode: false,
|
||||
inUnorderedList: false,
|
||||
inOrderedList: false,
|
||||
inMath: false,
|
||||
inLink: false,
|
||||
spellChecking: false,
|
||||
unspellCheckableRegion: false,
|
||||
|
||||
linkData: {
|
||||
linkText: null,
|
||||
linkURL: null,
|
||||
},
|
||||
|
||||
headerLevel: 0,
|
||||
listLevel: 0,
|
||||
|
||||
selectedText: '',
|
||||
};
|
||||
|
||||
export const selectionFormattingEqual = (a: SelectionFormatting, b: SelectionFormatting): boolean => {
|
||||
// Get keys from the default so that only SelectionFormatting key/value pairs are
|
||||
// considered. If a and/or b inherit from SelectionFormatting, we want to ignore
|
||||
// keys added by child interfaces.
|
||||
const keys = Object.keys(defaultSelectionFormatting) as (keyof SelectionFormatting)[];
|
||||
|
||||
for (const key of keys) {
|
||||
if (key === 'linkData') {
|
||||
// A deeper check is required for linkData
|
||||
if (a[key].linkText !== b[key].linkText || a[key].linkURL !== b[key].linkURL) {
|
||||
return false;
|
||||
}
|
||||
} else if (a[key] !== b[key]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
在新工单中引用
屏蔽一个用户