Skip to content

Commit

Permalink
Merge pull request #25 from k4a-l/feat/flexible-remove-style
Browse files Browse the repository at this point in the history
Added “bold” and “italic” and others options for removing styles.
  • Loading branch information
k4a-l authored Dec 19, 2024
2 parents 51d7d0d + 4738acf commit 9192204
Show file tree
Hide file tree
Showing 21 changed files with 1,384 additions and 73 deletions.
48 changes: 35 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"env": { "node": true },
"env": {
"node": true
},
"plugins": [
"@typescript-eslint"
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@cspell/recommended"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off"
}
}
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "none"
}
],
"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off",
"@cspell/spellchecker": [
"warn",
{
"cspell": {
"language": "en",
"ignoreRegExpList": [
// 日本語を無視
"[0-9A-Za-zぁ-んァ-ヶ亜-熙纊-黑]+",
"keymap",
"Prec"
]
}
}
]
}
}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# vscode
.vscode

# Intellij
*.iml
.idea
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

![github release](https://img.shields.io/github/v/release/k4a-dev/obsidian-heading-shifter?style=for-the-badge)

[![PayPal](https://github.com/user-attachments/assets/022d3ada-7995-4a27-b680-5ab6cfc117e1)](https://paypal.me/k4al)
Expand Down Expand Up @@ -88,31 +87,35 @@ Download directory(includes `main.js, manifest.json, styles.css`) from the lates

## Common Settings

| Setting | Description | Value(Default) |
| --------------- | ------------------------------------------------------------------------- | ----------------- |
| Style to remove | If this style is at the beginning of a line, remove it and make it Heading | boolean(All true) |
| Setting | Description | Value(Default) |
| ------------------------------------------------------------- | ------------------------------------------------------- | ----------------- |
| Style to remove(default) | If this style is at the <position> of a line, remove it | boolean(All true) |
| Style to remove(Other arbitrary group of regular expressions) | If this style is at the <position> of a line, remove it | string[]([]) |

### Detailed Description

#### Style to remove

This is the toggle between removing or retaining the leading `-` or `1.`,`2.`,... when applying Heading in a "single" row.

before

```
- line
```

after (`True`)

```
## line
```

after (`False`)

```
## - line
```


#### Use Case

Operate headings like an outliner like the following,
Expand Down
2 changes: 1 addition & 1 deletion config/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const config: Config.InitialOptions = {
},
globals: {
"ts-jest": {
tsonfig: "tsconfig.json",
tsconfig: "tsconfig.json",
isolatedModules: true,
},
},
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-heading-shifter",
"name": "Heading Shifter",
"version": "1.6.1",
"version": "1.7.0",
"minAppVersion": "0.12.0",
"description": "Easily Shift and Change markdown headings.",
"author": "kasahala",
Expand Down
Loading

0 comments on commit 9192204

Please sign in to comment.