Skip to content

Commit

Permalink
added some changes to allow for better memory use in UTs and added th…
Browse files Browse the repository at this point in the history
…e changes for release prep
  • Loading branch information
pjkaufman committed Sep 1, 2024
1 parent aca8509 commit d35837d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/docs/settings/spacing-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -677,13 +677,13 @@ More content here

Alias: `heading-blank-lines`

All headings have a blank line both before and after (except where the heading is at the beginning or end of the document).
All headings have one blank line both before and after (except where the heading is at the beginning or end of the document).

### Options

| Name | Description | List Items | Default Value |
| ---- | ----------- | ---------- | ------------- |
| `Bottom` | Insert a blank line after headings | N/A | `true` |
| `Bottom` | Ensures one blank line after headings | N/A | `true` |
| `Empty Line Between YAML and Header` | Keep the empty line between the YAML frontmatter and header | N/A | `true` |

### Additional Info
Expand Down
2 changes: 2 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ const config: Config.InitialOptions = {
'!**/__integration__/*.[jt]s?(x)',
'!**/test-vault/**/*.[jt]s?(x)',
],
// try to fix memory issues with jest when the UTs run
workerIdleMemoryLimit: '200MB',
};
export default config;
2 changes: 1 addition & 1 deletion manifest-beta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-linter",
"name": "Linter",
"version": "1.26.0-rc-3",
"version": "1.26.0",
"minAppVersion": "1.5.7",
"description": "Formats and styles your notes. It can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular markdown contents like list, italics, and bold styles; and more with the use of custom rule options as well.",
"author": "Victor Tao",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-linter",
"name": "Linter",
"version": "1.25.0",
"version": "1.26.0",
"minAppVersion": "1.5.7",
"description": "Formats and styles your notes. It can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular markdown contents like list, italics, and bold styles; and more with the use of custom rule options as well.",
"author": "Victor Tao",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-linter",
"version": "1.26.0-rc-3",
"version": "1.26.0",
"description": "Enforces consistent markdown styling for Obsidian (https://obsidian.md). It can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular markdown contents like list, italics, and bold styles; and more with the use of custom rule options as well.",
"main": "main.js",
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {createRunLinterRulesOptions, RulesRunner} from './rules-runner';
import {LinterError} from './linter-error';
import {LintConfirmationModal} from './ui/modals/lint-confirmation-modal';
import {SettingTab} from './ui/settings';
import {pasteUrlRegex} from './utils/regex';
import {urlRegex} from './utils/regex';
import {getTextInLanguage, LanguageStringKey, setLanguage} from './lang/helpers';
import {RuleAliasSuggest} from './cm6/rule-alias-suggester';
import {DEFAULT_SETTINGS, LinterSettings} from './settings-data';
Expand Down Expand Up @@ -618,10 +618,14 @@ export default class LinterPlugin extends Plugin {
// because otherwise having 2 URLs cause Obsidian-breaking conflict.
// Note: it looks like those two plugins look for an exact match for a URL,
// so we will too.
if (pasteUrlRegex.test(plainClipboard.trim())) {
const text = plainClipboard.trim();
if (urlRegex.test(text)) {
// debugger;
console.log('failed: "' + text + '"');
logWarn(getTextInLanguage('logs.paste-link-warning'));
return;
}
console.log('passed: "' + text + '"');

// prevent default pasting & abort when not successful
clipboardEv.stopPropagation();
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@
"1.23.1": "1.4.16",
"1.23.2": "1.4.16",
"1.24.0": "1.5.7",
"1.25.0": "1.5.7"
"1.25.0": "1.5.7",
"1.26.0": "1.5.7"
}

0 comments on commit d35837d

Please sign in to comment.