Repository: yzhang-gh/vscode-markdown
Branch: master
Commit: 414d6e33c62a
Files: 88
Total size: 461.5 KB
Directory structure:
gitextract_9glk66aa/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── Bug.md
│ │ ├── Feature.md
│ │ └── config.yml
│ └── workflows/
│ ├── main.yml
│ └── test.yml
├── .gitignore
├── .vscode/
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
├── .vscodeignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── build/
│ ├── build.js
│ ├── compilation.js
│ ├── duplicate-changelog.js
│ ├── logger.js
│ └── tsconfig.json
├── donate.md
├── media/
│ └── checkbox.css
├── package.json
├── package.nls.ja.json
├── package.nls.json
├── package.nls.ru-ru.json
├── package.nls.zh-cn.json
├── package.nls.zh-tw.json
├── src/
│ ├── IDisposable.ts
│ ├── completion.ts
│ ├── configuration/
│ │ ├── fallback.ts
│ │ ├── manager.ts
│ │ └── model.ts
│ ├── contract/
│ │ ├── LanguageIdentifier.ts
│ │ ├── MarkdownSpec.ts
│ │ ├── README.md
│ │ ├── SlugifyMode.ts
│ │ └── VisualStudioCodeLocaleId.ts
│ ├── editor-context-service/
│ │ ├── context-service-in-fenced-code-block.ts
│ │ ├── context-service-in-list.ts
│ │ ├── context-service-in-math-env.ts
│ │ ├── i-context-service.ts
│ │ └── manager.ts
│ ├── extension.ts
│ ├── formatting.ts
│ ├── listEditing.ts
│ ├── markdown-it-plugin-provider.ts
│ ├── markdownEngine.ts
│ ├── markdownExtensions.ts
│ ├── nls/
│ │ ├── README.md
│ │ ├── index.ts
│ │ └── resolveResource.ts
│ ├── preview.ts
│ ├── print.ts
│ ├── syntaxDecorations.ts
│ ├── tableFormatter.ts
│ ├── test/
│ │ ├── runTest.ts
│ │ └── suite/
│ │ ├── index.ts
│ │ ├── integration/
│ │ │ ├── blockquoteEditing.test.ts
│ │ │ ├── formatting.test.ts
│ │ │ ├── listEditing.fallback.test.ts
│ │ │ ├── listEditing.test.ts
│ │ │ ├── listRenumbering.test.ts
│ │ │ ├── tableFormatter.test.ts
│ │ │ └── toc.test.ts
│ │ ├── unit/
│ │ │ ├── linksRecognition.test.ts
│ │ │ └── slugify.test.ts
│ │ └── util/
│ │ ├── configuration.ts
│ │ └── generic.ts
│ ├── theming/
│ │ ├── constant.ts
│ │ ├── decorationManager.ts
│ │ └── decorationWorkerRegistry.ts
│ ├── toc.ts
│ ├── util/
│ │ ├── contextCheck.ts
│ │ ├── generic.ts
│ │ ├── katex-funcs.ts
│ │ ├── lazy.ts
│ │ └── slugify.ts
│ └── zola-slug/
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── LICENSE
│ └── src/
│ └── lib.rs
├── syntaxes/
│ ├── katex.tmLanguage.json
│ ├── math_display.markdown.tmLanguage.json
│ └── math_inline.markdown.tmLanguage.json
├── test/
│ └── test.md
├── tools/
│ └── set-welcome-message.js
├── tsconfig.base.json
├── tsconfig.json
└── webpack.config.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/Bug.md
================================================
---
name: '🐛 Bug report'
about: 'Report errors or unexpected behavior.'
---
### What's the problem
### What's the expected result
### How to reproduce
1. ...
2. ...
### Other information
================================================
FILE: .github/ISSUE_TEMPLATE/Feature.md
================================================
---
name: '✨ Feature request'
about: 'Suggest a new feature or improvement.'
---
### Proposal
### Other information
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: '🔒 Security issue'
url: 'https://github.com/yzhang-gh'
about: 'Please email @yzhang-gh.'
================================================
FILE: .github/workflows/main.yml
================================================
name: CI
# Build VSIX packages in production and debug mode.
# Run tests against debug build.
#
# This workflow is designed to be run on pushing to master branch.
on:
push:
branches: [master]
paths:
- ".github/workflows/*.yml"
- "src/**"
- "syntaxes/**"
- ".*"
- "package*.json"
- "tsconfig.json"
- "webpack.*"
- "!**.md"
workflow_dispatch:
repository_dispatch:
types: ["package"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Setup Node.js environment"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Setup Rust Toolchain for GitHub CI
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: "Install dependencies"
run: |
npm run build-wasm
npm ci
# Our prepublish script runs in production mode by default.
# We should run tests against debug build to make error messages as useful as possible.
- name: "Build release"
run: |
npx vsce package --pre-release
export NODE_ENV='development'
npx vsce package --pre-release --out debug.vsix
- name: Test
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm test
- name: "Rust test"
run: |
cd ./src/zola-slug/
cargo test --release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Markdown-All-in-One-${{ github.sha }}
path: ./*.vsix
# If the run failed, npm log may help to diagnose.
- name: "(debug) Upload npm log"
if: ${{ !success() }}
uses: actions/upload-artifact@v4
with:
name: "npm-debug-log"
path: "~/.npm/_logs"
================================================
FILE: .github/workflows/test.yml
================================================
name: Test
# Run tests only.
#
# This workflow is designed to be run on PR to validate commits.
# It can be seen as a short version of `main.yml`.
on:
pull_request:
branches: ["master"]
# Sometimes we want to test a few minor changes.
# To avoid triggering the workflow twice,
# this is only enabled for branch names that are very unlikely to be a PR head.
push:
branches: ["dev/-/**"]
paths:
- "src/**"
- "package-lock.json"
- "!**.md"
workflow_dispatch:
repository_dispatch:
types: ["test"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Setup Node.js environment"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Setup Rust Toolchain for GitHub CI
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: "Install dependencies"
run: |
npm run build-wasm
npm ci
- name: "Build debug"
run: |
export NODE_ENV='development'
npx vsce package --pre-release --out debug.vsix
- name: Test
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm test
- name: "Rust test"
run: |
cd ./src/zola-slug/
cargo test --release
- name: "(debug) Upload npm log"
if: ${{ !success() }}
uses: actions/upload-artifact@v4
with:
name: "npm-debug-log"
path: "~/.npm/_logs"
================================================
FILE: .gitignore
================================================
out
node_modules
*.vsix
ROADMAP.md
*.log
/.vscode-test
dist
tmp
# The welcome materials
/welcome/**
/changes.md
================================================
FILE: .vscode/launch.json
================================================
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: dev-build"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--user-data-dir=tmp",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: pretest"
}
]
}
================================================
FILE: .vscode/settings.json
================================================
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
================================================
FILE: .vscode/tasks.json
================================================
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
// "$tsc-watch" definition: https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/package.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Dev - Compile",
"detail": "Fast compilation for development time.",
"type": "npm",
"script": "dev-compile",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
================================================
FILE: .vscodeignore
================================================
# Important: The patterns are relative to the location of the vscodeignore file.
# To help understand and edit, patterns should match the whole path whenever possible.
# Development tools, intermediate build results, and temporary files
.vscode-test/
build/**
out/
test/**
tools/
**/*.map
# Source files
node_modules/**
src/
**/*.ts
!node_modules/katex/dist/fonts/*.woff2
!node_modules/katex/dist/katex.min.css
!node_modules/markdown-it-github-alerts/styles/*.css
# Configuration files
.github/
.vscode/
.gitignore
**/tsconfig*.json
package-json.lock
webpack.config.js
# The welcome flag file
welcome/WELCOMED
# VS Code maps local image paths to GitHub paths
images
!images/Markdown-mark.png
================================================
FILE: CHANGELOG.md
================================================
## 3.6.3 (2025.03.09)
### New
- [TOC] Add a new slugify method for Zola ([#1419](https://github.com/yzhang-gh/vscode-markdown/pull/1419)). Thanks, [hill (@float3)](https://github.com/float3).
- [i18n] Add zh-tw translations ([#1499](https://github.com/yzhang-gh/vscode-markdown/pull/1499)). Thanks, [Will 保哥 (@doggy8088)](https://github.com/doggy8088).
### Fixes
- Fix keybinding conflict with GitHub Copilot NES ([#1498](https://github.com/yzhang-gh/vscode-markdown/pull/1498)). Thanks, [Will 保哥 (@doggy8088)](https://github.com/doggy8088).
### Others
- [TOC] Update slugify method for Azure DevOps ([#1383](https://github.com/yzhang-gh/vscode-markdown/pull/1383)). Thanks, [Levi Richards (@PHLUNK)](https://github.com/PHLUNK).
- [GFM] Make `markdown-it-github-alerts` case insensitive ([#1389](https://github.com/yzhang-gh/vscode-markdown/pull/1389)). Thanks, [PraZ (@prazdevs)](https://github.com/prazdevs).
- Support the Eclipse Theia IDE ([#1442](https://github.com/yzhang-gh/vscode-markdown/pull/1442)). Thanks, [Max Jakobitsch (@madmini)](https://github.com/madmini).
## 3.6.0/3.6.1/3.6.2 (2024.01.08)
### New
- [Completion] Add an option `completion.enabled` which allows to re-enable the path completion provided by this extension ([#1258](https://github.com/yzhang-gh/vscode-markdown/issues/1258)).
- [Export] Add a right-click menu entry for the command `printToHtml` ([#1278](https://github.com/yzhang-gh/vscode-markdown/pull/1278)). Thanks, [Dihong Luo (@Andy-Dihong-Luo)](https://github.com/Andy-Dihong-Luo).
- [Export] Add an option `print.pureHtml` ([#1310](https://github.com/yzhang-gh/vscode-markdown/issues/1310)).
- [Table formatter] Add range format support ([#1361](https://github.com/yzhang-gh/vscode-markdown/pull/1361)). Thanks, [PeaceShi (@peaceshi)](https://github.com/peaceshi).
- [List continuation] New `onEnterKey` logic so as to align with other editors ([#1364](https://github.com/yzhang-gh/vscode-markdown/pull/1364)). Thanks, [@HughLink](https://github.com/HughLink).
- Add action buttons (e.g. toggle bold, italic) to the editor toolbar, you can enable it with a new option `showActionButtons` ([#1358](https://github.com/yzhang-gh/vscode-markdown/issues/1358)). Thanks, [PeaceShi (@peaceshi)](https://github.com/peaceshi).
- Support [GFM alerts](https://github.com/orgs/community/discussions/16925) ([#1350](https://github.com/yzhang-gh/vscode-markdown/issues/1350)). Thanks, [PraZ (@prazdevs)](https://github.com/prazdevs).
### Fixes
- Fix `when` conditions of the `closePreview` commands/keybindings ([#1263](https://github.com/yzhang-gh/vscode-markdown/issues/1263)).
- Remove the default key binding Alt+c on Mac ([#1285](https://github.com/yzhang-gh/vscode-markdown/issues/1285)).
- [Auto preview] Fix conditions (Jupyter Notebook, VS Code comment widget) of the `autoShowPreviewToSide` feature ([#1288](https://github.com/yzhang-gh/vscode-markdown/pull/1288), thanks, [Dihong Luo (@Andy-Dihong-Luo)](https://github.com/Andy-Dihong-Luo)), ([#1342](https://github.com/yzhang-gh/vscode-markdown/issues/1342)).
- [Export] No long convert `.md` to `.html` if the links are GitHub urls ([#1324](https://github.com/yzhang-gh/vscode-markdown/issues/1324)).
- [Export] Now correctly convert `.md#anchor` type links ([#1347](https://github.com/yzhang-gh/vscode-markdown/issues/1347)).
- [List continuation] Check option `editor.acceptSuggestionOnEnter` ([#1367](https://github.com/yzhang-gh/vscode-markdown/issues/1367)).
- **v3.6.2 (2024.01.15)** Fix "GFM alerts" exported HTML styles ([#1386](https://github.com/yzhang-gh/vscode-markdown/issues/1386)).
### Others
- [i18n] Update Chinese translations ([#1286](https://github.com/yzhang-gh/vscode-markdown/pull/1286)). Thanks, [Dihong Luo (@Andy-Dihong-Luo)](https://github.com/Andy-Dihong-Luo).
## 3.5.1 (2023.03.26)
### Fixes
- Quarto support, [#618](https://github.com/yzhang-gh/vscode-markdown/issues/618) follow-up ([#1199](https://github.com/yzhang-gh/vscode-markdown/pull/1199)). Thanks, [Dongdong Kong (@kongdd)](https://github.com/kongdd).
- [List renumbering] Incorrect second-level list renumbering on line delete ([#1155](https://github.com/yzhang-gh/vscode-markdown/issues/1155)).
- [Toggle list] A bug in multi-line case ([#1203](https://github.com/yzhang-gh/vscode-markdown/issues/1203)).
- [HTML] A bug that generates duplicated heading ids ([#1232](https://github.com/yzhang-gh/vscode-markdown/issues/1232)).
### Others
- [i18n] Add Russian translations ([#1201](https://github.com/yzhang-gh/vscode-markdown/pull/1201)). Thanks, [Sergey Romanov (@Serhioromano)](https://github.com/Serhioromano).
- Fix the Shields build status badge ([#1215](https://github.com/yzhang-gh/vscode-markdown/pull/1215)). Thanks, [James H (@hughesjs)](https://github.com/hughesjs).
- Remove extra spaces when pasting links on selected text ([#1245](https://github.com/yzhang-gh/vscode-markdown/pull/1245)). Thanks, [auh (@fanlushuai)](https://github.com/fanlushuai).
- [Math] KaTeX v0.16.4
- [Completion] Disable path completions as VS Code now has built-in support.
- [Completion] Always exclude `.git` from completions.
## 3.5.0 (2022.11.20)
### New
- [TOC] Use `` to omit a certain section from the table of contents. `` is still supported for backward compatibility ([#1118](https://github.com/yzhang-gh/vscode-markdown/issues/1118)).
- [List continuation] The continuation of task list should now has the same behavior as other editors ([#1138](https://github.com/yzhang-gh/vscode-markdown/pull/1138)). Thanks, [@yy0931](https://github.com/yy0931).
- [List] New option `list.toggle.candidate-markers` to custom list markers when you use command `Toggle list` ([#1145](https://github.com/yzhang-gh/vscode-markdown/pull/1145)). Thanks, [@petergithub](https://github.com/petergithub).
- Add a new option `bold.indicator` so you can use either `**` or `__` for bold text ([#1174](https://github.com/yzhang-gh/vscode-markdown/pull/1174)). Thanks, [@krsche](https://github.com/krsche) and [Samuel Weinhardt (@samuel-weinhardt)](https://github.com/samuel-weinhardt).
- [R Markdown] Add support for R Markdown and a new option `extraLangIds` which accepts only `rmd` ~~and `qmd`~~ for now. ([#618](https://github.com/yzhang-gh/vscode-markdown/issues/618)). Thank [Dongdong Kong (@kongdd)](https://github.com/kongdd) for [#1198](https://github.com/yzhang-gh/vscode-markdown/pull/1198).
- [GFM task lists] Checkboxes are now visually enabled but but not clickable ([#1189](https://github.com/yzhang-gh/vscode-markdown/pull/1189)). Thanks, [Ian Holst (@ianholst)](https://github.com/ianholst).
### Fixes
- Update word pattern for code spans and strikethrough ([#1130](https://github.com/yzhang-gh/vscode-markdown/pull/1130)). Thanks, [@Yarakashi-Kikohshi](https://github.com/Yarakashi-Kikohshi).
- [Syntax decorations] of code spans ([#1134](https://github.com/yzhang-gh/vscode-markdown/pull/1134), [#1135](https://github.com/yzhang-gh/vscode-markdown/pull/1135)). Thanks, [@yy0931](https://github.com/yy0931).
- [Ordered list renumbering] An issue with sub-list ([#1155](https://github.com/yzhang-gh/vscode-markdown/issues/1155)).
- [HTML] Remove `` comment in the title of the exported HTML ([#1175](https://github.com/yzhang-gh/vscode-markdown/issues/1175)).
### Others
- Code refactoring ([#1119](https://github.com/yzhang-gh/vscode-markdown/pull/1119)). Thanks, [@Lemmingh](https://github.com/Lemmingh).
- [Math] Update math function completions.
- Add custom context key for `onTabKey/onShiftTabKey` key binding. There should be less key binding conflicts in the future ([#1075](https://github.com/yzhang-gh/vscode-markdown/pull/1075)). Thanks, [@takumisoft68](https://github.com/takumisoft68).
- Better blockquote continuation ([#1183](https://github.com/yzhang-gh/vscode-markdown/issues/1183)).
- Reduce extension size by removing unused images ([#1161](https://github.com/yzhang-gh/vscode-markdown/issues/1161)). Thanks, [Kid (@kidonng)](https://github.com/kidonng).
## 3.4.3 (2022.4.24)
### Fixes
- [Math] mhchem support ([#1116](https://github.com/yzhang-gh/vscode-markdown/issues/1116)).
- VS Code freezes because of the new word pattern ([#1117](https://github.com/yzhang-gh/vscode-markdown/issues/1117)).
## 3.4.1 (2022.4.17)
**Update 3.4.2**: fix dependencies.
### Breaking Changes
- [Table formatter] Now you need to escape the pipe character (`|`) inside table cells, even if it is in a code span. This behavior follows the [GFM spec](https://github.github.com/gfm/#example-200). ([#24](https://github.com/yzhang-gh/vscode-markdown/issues/24))
### New
- [Auto completion] Add `.webp` files to the image path suggestions ([#934](https://github.com/yzhang-gh/vscode-markdown/issues/934)).
### Fixes
- Resolve Tab conflict when `inlineSuggestionVisible`, e.g., GitHub Copilot ([#665](https://github.com/yzhang-gh/vscode-markdown/issues/665), [#1011](https://github.com/yzhang-gh/vscode-markdown/issues/1011)).
- Multi-cursor list editing ([#829](https://github.com/yzhang-gh/vscode-markdown/issues/829), [#926](https://github.com/yzhang-gh/vscode-markdown/issues/926)).
- You can now add section numbers larger than 99 ([#852](https://github.com/yzhang-gh/vscode-markdown/issues/852)).
- Resolve keybinding conflict Alt + Shift + Up/Down on Linux ([#857](https://github.com/yzhang-gh/vscode-markdown/issues/857)).
- TOC with a heading ending with literal `#` ([#867](https://github.com/yzhang-gh/vscode-markdown/issues/867)).
- Load extension-contributed scripts asynchronously ([#956](https://github.com/yzhang-gh/vscode-markdown/pull/956)). Thanks, [Jay Park (@phoihos)](https://github.com/phoihos).
- The internal command `_wrapBy` ignores the `after` argument ([#1051](https://github.com/yzhang-gh/vscode-markdown/pull/1051)). Thanks, [@King-of-Infinite-Space](https://github.com/King-of-Infinite-Space).
- Set `vscode-dark` class when exporting to HTML with dark theme ([#1091](https://github.com/yzhang-gh/vscode-markdown/pull/1091)). Thanks, [Raphael Sander (@raphaelsander)](https://github.com/raphaelsander).
### Others
- Code health ([#869](https://github.com/yzhang-gh/vscode-markdown/pull/869)). Thanks to [@Lemmingh](https://github.com/Lemmingh).
- (Temporary fix) The `toggleMath` issue with blockquotes ([#907](https://github.com/yzhang-gh/vscode-markdown/issues/907)).
- Update Japanese translations ([#909](https://github.com/yzhang-gh/vscode-markdown/pull/909)). Thanks, [にせ十字 (@falsecross)](https://github.com/falsecross).
- [Math] Upgrade KaTeX ([#943](https://github.com/yzhang-gh/vscode-markdown/issues/943)).
- The `togglePreview` command has been replaced by `closePreview` ([`05fb1af`](https://github.com/yzhang-gh/vscode-markdown/commit/05fb1af27150fa8c1c271fc03533d28787ea25d1)).
- Enable virtual workspaces support (limited functionality) ([#948](https://github.com/yzhang-gh/vscode-markdown/pull/948), [#996](https://github.com/yzhang-gh/vscode-markdown/pull/996))
- Update Markdown word pattern ([#1092](https://github.com/yzhang-gh/vscode-markdown/issues/1092)).
- A few documentation improvements.
---
### 3.4.0 (2020.11.14)
- **New**: New TOC slugify mode `azureDevops` ([#802](https://github.com/yzhang-gh/vscode-markdown/issues/802)).
- **Fix**: Math syntax highlight ([#346](https://github.com/yzhang-gh/vscode-markdown/issues/346)).
- **Fix**: Color of the inline code span outline (now using `editor.selectionBackground`) ([#734](https://github.com/yzhang-gh/vscode-markdown/issues/734)).
- **Fix**: Broken TOC links if headings have emoji ([#792](https://github.com/yzhang-gh/vscode-markdown/issues/792)).
- **Fix**: Catch exception of other Markdown extensions ([#834](https://github.com/yzhang-gh/vscode-markdown/issues/834)).
- **Fix**: Compatibility with [Markdown Preview Github Styling](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-preview-github-styles).
- **Other**: Many documentation improvements.
- **Other**: Automatically build `debug.vsix` using GitHub Actions ([#837](https://github.com/yzhang-gh/vscode-markdown/pull/837)).
---
### 3.3.0 (2020.08.31)
- **New**: You can now use `` comment to specify a title of the exported HTML ([#506](https://github.com/yzhang-gh/vscode-markdown/issues/506)).
- **New**: Added a `toc.slugifyMode` option `gitea` ([#763](https://github.com/yzhang-gh/vscode-markdown/pull/763)). Thanks, [Rodolphe Houdas (@rodolpheh)](https://github.com/rodolpheh).
- **New**: Option `completion.respectVscodeSearchExclude` controlling where to look for file path completions ([#789](https://github.com/yzhang-gh/vscode-markdown/issues/789)).
- **Fix**: Failure of `toggleList` command if there are more than 9 list items ([#776](https://github.com/yzhang-gh/vscode-markdown/issues/776)).
- **Fix**: Command `togglePreviewToSide` wouldn't close the preview tab ([#780](https://github.com/yzhang-gh/vscode-markdown/pull/780)). Thanks, [Anton Tuchkov (@Technik-J)](https://github.com/Technik-J).
- **Fix**: `- - -` was wrongly treated as a list item ([#785](https://github.com/yzhang-gh/vscode-markdown/issues/785)).
- **Other**: Activate extension on command `printToHtmlBatch` ([#769](https://github.com/yzhang-gh/vscode-markdown/issues/769)).
---
### 3.2.0 (2020.07.25)
- **New**: [Batch export] command "print document**s** to HTML" ([#594](https://github.com/yzhang-gh/vscode-markdown/issues/594), [#747](https://github.com/yzhang-gh/vscode-markdown/issues/747)).
- **Fix**: [HTML export] escape spaces in image path ([#731](https://github.com/yzhang-gh/vscode-markdown/issues/731)).
- **Fix**: [TOC] headings with LaTeX ([#732](https://github.com/yzhang-gh/vscode-markdown/issues/732)).
- **Other**: A lot of `README` improvements.
---
### 3.1.0 (2020.06.20)
- **New**: Option `print.includeVscodeStylesheets` ([#726](https://github.com/yzhang-gh/vscode-markdown/pull/726)). Thanks, [Gluck_S (@Glucksistemi)](https://github.com/Glucksistemi).
- **New**: Option `syntax.decorationFileSizeLimit` ([#728](https://github.com/yzhang-gh/vscode-markdown/pull/728)). Thanks, [Rohit Patnaik (@quanticle)](https://github.com/quanticle).
- **Fix**: Wrong mime type of SVG in exported HTML ([#694](https://github.com/yzhang-gh/vscode-markdown/issues/694)).
- **Fix**: Heading numbering issues ([#695](https://github.com/yzhang-gh/vscode-markdown/issues/695), [#701](https://github.com/yzhang-gh/vscode-markdown/issues/701)).
- **Fix**: TOC issues ([#555](https://github.com/yzhang-gh/vscode-markdown/issues/555), [#699](https://github.com/yzhang-gh/vscode-markdown/issues/699), [#706](https://github.com/yzhang-gh/vscode-markdown/issues/706))
- **Fix**: Counterintuitive behavior of command `checkTaskList` ([#700](https://github.com/yzhang-gh/vscode-markdown/issues/700)).
- **Other**: `README` improvements ([#709](https://github.com/yzhang-gh/vscode-markdown/pull/709)). Thanks, [Quang Vu (@vhquang)](https://github.com/vhquang).
---
### 3.0.0 (2020.05.24)
#### Highlights
- **Breaking change**: Replace `toc.githubCompatibility` with `toc.slugifyMode`. Now GitLab-style TOC is supported ([#660](https://github.com/yzhang-gh/vscode-markdown/pull/660)). Thanks, [@BeeeWall](https://github.com/BeeeWall).
- **New**: Command to add/update/remove numbering to headings ([#457](https://github.com/yzhang-gh/vscode-markdown/issues/457), [#555](https://github.com/yzhang-gh/vscode-markdown/issues/555)).
- **New**: Automatically include other installed Markdown plugins when exporting Markdown to HTML ([#658](https://github.com/yzhang-gh/vscode-markdown/pull/658)). Thanks, [qiqiworld (@1354092549)](https://github.com/1354092549).
- **New**: The links to `.md` files will be renamed to `.html` in the exported HTML ([#667](https://github.com/yzhang-gh/vscode-markdown/issues/667)).
- **Fix**: Properly handle Markdown syntax in TOC entries ([#654](https://github.com/yzhang-gh/vscode-markdown/pull/654)).
- **Fix**: An issue with `workspaceFolders` ([#666](https://github.com/yzhang-gh/vscode-markdown/issues/666)).
- **Fix**: Slugify function `github` should downcase also non-Latin characters ([#670](https://github.com/yzhang-gh/vscode-markdown/pull/670)). Thanks, [lesha (@lesha-co)](https://github.com/lesha-co).
- **Fix**: TOC issues ([#675](https://github.com/yzhang-gh/vscode-markdown/issues/675), [#683](https://github.com/yzhang-gh/vscode-markdown/issues/683)).
- **Fix**: Table formatter fails if there are two identical tables ([#682](https://github.com/yzhang-gh/vscode-markdown/issues/682)).
- **Fix**: CJ**K** characters in Markdown Tables ([#685](https://github.com/yzhang-gh/vscode-markdown/issues/685)).
- **Other**: Expose `wrapBy` function ([#663](https://github.com/yzhang-gh/vscode-markdown/issues/663)).
- **Other**: `README` improvements ([#681](https://github.com/yzhang-gh/vscode-markdown/pull/681)). Thanks, [Kaspar (@casaper)](https://github.com/casaper).
---
### 2.8.0 (2020.04.10)
- **New**: Path auto-completion now respects option `search.exclude` ([#614](https://github.com/yzhang-gh/vscode-markdown/issues/614)).
- **New**: Suggest `katex.macros` in math environments ([#633](https://github.com/yzhang-gh/vscode-markdown/pull/633)). Thanks, [Y. Ding (@yd278)](https://github.com/yd278).
- **New**: Option `math.enabled`.
- **Fix**: Escape spaces in file path completions ([#590](https://github.com/yzhang-gh/vscode-markdown/pull/590)). Thanks, [Tomoki Aonuma (@uasi)](https://github.com/uasi).
- **Fix**: TOC issues ([#593](https://github.com/yzhang-gh/vscode-markdown/issues/593), [#603](https://github.com/yzhang-gh/vscode-markdown/issues/603), [#629](https://github.com/yzhang-gh/vscode-markdown/issues/629)).
- **Fix**: Table formatter for Thai characters ([#602](https://github.com/yzhang-gh/vscode-markdown/pull/602)). Thanks, [Nutchanon Ninyawee (@CircleOnCircles)](https://github.com/CircleOnCircles).
- **Fix**: Single column table formatting ([#604](https://github.com/yzhang-gh/vscode-markdown/pull/604)). Thanks, [@chnicholas](https://github.com/chnicholas).
- **Fix**: Issues with option `omitFromToc` ([#644](https://github.com/yzhang-gh/vscode-markdown/issues/644)).
- **Other**: Added Japanese translation ([#608](https://github.com/yzhang-gh/vscode-markdown/pull/608)). Thanks, [にせ十字 (@falsecross)](https://github.com/falsecross).
- **Other**: Upgraded KaTeX.
- **Other**: Moved from AppVeyor to GitHub Actions. Thank [雪松 (@yxs)](https://github.com/yxs) for the CI badge.
---
### 2.7.0 (2020.01.11)
- **New**: Option `omittedFromToc` ([#580](https://github.com/yzhang-gh/vscode-markdown/pull/580)). Thanks, [Dorian Marchal (@dorian-marchal)](https://github.com/dorian-marchal).
- **Fix**: Don't continue list item in math environment ([#574](https://github.com/yzhang-gh/vscode-markdown/issues/574)).
- **Fix**: HTML entities in TOC ([#575](https://github.com/yzhang-gh/vscode-markdown/issues/575)).
- **Fix**: User-defined KaTeX macros weren't included in the exported HTML ([#579](https://github.com/yzhang-gh/vscode-markdown/issues/579)).
- **Fix**: Strange HTML tags in the generated TOC ([#585](https://github.com/yzhang-gh/vscode-markdown/issues/585)).
- **Fix**: Use `%20` for space in URL ([#589](https://github.com/yzhang-gh/vscode-markdown/issues/589)).
- **Other**: Update keybindings ([#571](https://github.com/yzhang-gh/vscode-markdown/issues/571)).
- **Other**: Disable decorations for large files (threshold 128 KB → 50 KB) ([#578](https://github.com/yzhang-gh/vscode-markdown/issues/578)).
---
### 2.6.1 (2019.12.12)
- **Fix**: Strange HTML tags in TOC ([#567](https://github.com/yzhang-gh/vscode-markdown/issues/567)).
---
### 2.6.0 (2019.12.08)
- **New**: Support `` above a heading ([#495](https://github.com/yzhang-gh/vscode-markdown/issues/495)).
- **New**: Support `` above a list ([#525](https://github.com/yzhang-gh/vscode-markdown/issues/525)).
- **New**: Option `print.theme` ([#534](https://github.com/yzhang-gh/vscode-markdown/issues/534)).
- **New**: Command "toggle code block" ([#551](https://github.com/yzhang-gh/vscode-markdown/pull/551)). Thanks, [@axiqia](https://github.com/axiqia).
- **New**: Support image path completions for HTML `img` tags.
- **New**: Include [Markdown Footnotes](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-footnotes) in exported HTML if you have that extension installed ([#212](https://github.com/yzhang-gh/vscode-markdown/issues/212)).
- **Fix**: TOC links ([#494](https://github.com/yzhang-gh/vscode-markdown/issues/494), [#515](https://github.com/yzhang-gh/vscode-markdown/issues/515) and [#550](https://github.com/yzhang-gh/vscode-markdown/issues/550)).
- **Fix**: No longer convert images paths with data URIs ([#539](https://github.com/yzhang-gh/vscode-markdown/pull/539)). Thanks, [@leapwill](https://github.com/leapwill).
- **Fix**: Unexpected ordered list marker updating ([#546](https://github.com/yzhang-gh/vscode-markdown/pull/546)). Thanks, [Alper Cugun (@alper)](https://github.com/alper).
- **Fix**: Shift + Tab never outdents ([#561](https://github.com/yzhang-gh/vscode-markdown/issues/561)).
- **Other**: Update `README` with high-resolution images.
---
### 2.5.0/2.5.1 (2019.10.12)
- **New**: File path completions ([#497](https://github.com/yzhang-gh/vscode-markdown/pull/497)). Thanks, [@linsui](https://github.com/linsui).
- **New**: Toggle multiple checkboxes ([#513](https://github.com/yzhang-gh/vscode-markdown/pull/513)). Thanks, [@GeorchW](https://github.com/GeorchW).
- **New**: Option `print.validateUrls` ([#517](https://github.com/yzhang-gh/vscode-markdown/pull/517)). Thanks, [Olmo Maldonado (@ibolmo)](https://github.com/ibolmo).
- **New**: Add KaTeX mhchem extension ([#521](https://github.com/yzhang-gh/vscode-markdown/pull/521)). Thanks, [Balthild Ires (@balthild)](https://github.com/balthild).
- **New**: Option `completion.root` ([#526](https://github.com/yzhang-gh/vscode-markdown/issues/526)).
- **Fix**: Cannot recognize indented headings ([#508](https://github.com/yzhang-gh/vscode-markdown/issues/508)).
- **Fix**: TOC and code blocks ([#532](https://github.com/yzhang-gh/vscode-markdown/issues/532)).
- **Other**: New logo with white background ([#498](https://github.com/yzhang-gh/vscode-markdown/issues/498)).
- **Other**: Remove obsolete HTML attributes ([#499](https://github.com/yzhang-gh/vscode-markdown/issues/499)).
- **Other**: Use light theme in exported HTML ([#529](https://github.com/yzhang-gh/vscode-markdown/issues/529)).
---
### 2.4.1/2.4.2 (2019.07.21)
- **New**: Option `toc.downcaseLink` (default: `true`) ([#476](https://github.com/yzhang-gh/vscode-markdown/issues/476)).
- **Fix**: KaTeX macros ([#473](https://github.com/yzhang-gh/vscode-markdown/pull/473)). Thanks, [Pierre (@PierreMarchand20)](https://github.com/PierreMarchand20).
- **Fix**: Ignore headings in comments ([#462](https://github.com/yzhang-gh/vscode-markdown/issues/462)).
- **Fix**: Magic comment `` was ignored ([#490](https://github.com/yzhang-gh/vscode-markdown/issues/490)).
- **Other**: Improve performance for large documents
---
### 2.4.0 (2019.06.16)
- **New**: Command `toggleList` (*Note: no default keybinding assigned*) ([#237](https://github.com/yzhang-gh/vscode-markdown/issues/237), [#307](https://github.com/yzhang-gh/vscode-markdown/issues/307)).

- **New**: Support KaTeX macros ([#426](https://github.com/yzhang-gh/vscode-markdown/issues/426)). Thanks, [Pierre (@PierreMarchand20)](https://github.com/PierreMarchand20).
- **Fix**: Image paths ([#415](https://github.com/yzhang-gh/vscode-markdown/issues/415)).
- **Fix**: Fenced code block checking ([#434](https://github.com/yzhang-gh/vscode-markdown/issues/434)).
- **Other**: Don't downcase the TOC links ([#312](https://github.com/yzhang-gh/vscode-markdown/issues/312)). Thanks, [Scott Meesseman (@spmeesseman)](https://github.com/spmeesseman).
- **Other**: Command `toggleMath` now cycles through `|` -> `$|$` -> `$$\n|\n$$` -> `$$ | $$` ([#421](https://github.com/yzhang-gh/vscode-markdown/issues/421#issuecomment-493747064)). Thanks, [Li Yiming (@upupming)](https://github.com/upupming).
- **Other**: Don't include KaTeX stylesheets in the exported HTML if no math ([#430](https://github.com/yzhang-gh/vscode-markdown/issues/430)).
- **Other**: Upgrade KaTeX ([#446](https://github.com/yzhang-gh/vscode-markdown/issues/446)).
- **Other**: Better math completions ([PR#470](https://github.com/yzhang-gh/vscode-markdown/pull/470), [PR#471](https://github.com/yzhang-gh/vscode-markdown/pull/471)).
---
### 2.3.1 (2019.04.29)
- **Fix**: Option `markdown.extension.print.onFileSave` not respected ([#432](https://github.com/yzhang-gh/vscode-markdown/issues/432)).
---
### 2.3.0 (2019.04.28)
- **New** Prefer unused links for reference link label completions ([#414](https://github.com/yzhang-gh/vscode-markdown/issues/414)). Thanks, [Chris (@alshain)](https://github.com/alshain).
- **New**: Option `markdown.extension.print.onFileSave` ([#417](https://github.com/yzhang-gh/vscode-markdown/issues/417)). Thanks, [Li Yiming (@upupming)](https://github.com/upupming).
- **New**: Autocompletion for heading links ([#419](https://github.com/yzhang-gh/vscode-markdown/issues/419)). Thanks again, [Chris (@alshain)](https://github.com/alshain).
- **Fix**: Syntax decorations ([#390](https://github.com/yzhang-gh/vscode-markdown/issues/390)).
- **Fix**: Table formatter ([#408](https://github.com/yzhang-gh/vscode-markdown/issues/408)).
- **Fix**: Delete space rather than outdent list when there are two or more spaces on Backspace ([#410](https://github.com/yzhang-gh/vscode-markdown/issues/410)).
- **Fix**: Image paths in exported HTML ([#415](https://github.com/yzhang-gh/vscode-markdown/issues/415), [#429](https://github.com/yzhang-gh/vscode-markdown/issues/429)).
- **Fix**: TOC and fenced code blocks ([#425](https://github.com/yzhang-gh/vscode-markdown/issues/425)).
- **Other**: Sort KaTeX functions (lowercase first) ([#413](https://github.com/yzhang-gh/vscode-markdown/issues/413)).
- **Other**: Update KaTeX supported functions ([#416](https://github.com/yzhang-gh/vscode-markdown/issues/416)). Thanks again, [Li Yiming (@upupming)](https://github.com/upupming).
---
### 2.2.0 (2019.03.24)
- **Fix**: Better syntax decorations ([#390](https://github.com/yzhang-gh/vscode-markdown/issues/390), [#393](https://github.com/yzhang-gh/vscode-markdown/issues/393)).
- **Fix**: Recognize relative path of `markdown.styles` when exporting to HTML ([#394](https://github.com/yzhang-gh/vscode-markdown/issues/394)).
- **Other**: Unregister formatter when being disabled ([#395](https://github.com/yzhang-gh/vscode-markdown/issues/395)).
- **Other**: Better URL regexp ([#397](https://github.com/yzhang-gh/vscode-markdown/issues/397)). Thanks, [Igor (@Ovsyanka)](https://github.com/Ovsyanka).
- **Other**: Remove default `alt + s` keybinding for macOS ([#404](https://github.com/yzhang-gh/vscode-markdown/issues/404)).
- **Other**: webpack!
---
### 2.1.1 (2019.03.05)
- **Fix**: Table format ([#381](https://github.com/yzhang-gh/vscode-markdown/issues/381)).
- **Fix**: Unexpected link creation on pasting ([#382](https://github.com/yzhang-gh/vscode-markdown/issues/382)).
- **Fix**: Image path encoding when printing ([#385](https://github.com/yzhang-gh/vscode-markdown/issues/385)).
---
### 2.1.0 (2019.02.16)
- **New**: Paste link on selected text ([#20](https://github.com/yzhang-gh/vscode-markdown/issues/20)).

- **New**: Multi-cursor support ([#33](https://github.com/yzhang-gh/vscode-markdown/issues/33)).

- **New**: Auto-complete for reference link IDs ([#366](https://github.com/yzhang-gh/vscode-markdown/issues/366)).

- **Fix**: Conflict with `editor.tabCompletion` setting ([#367](https://github.com/yzhang-gh/vscode-markdown/issues/367)).
- **Other**: Added ways to buy me a coffee 😉 ([PayPal](https://www.paypal.me/2yzhang), [Alipay or WeChat](donate.md)).
---
### 2.0.0 (2019.01.19)
🎂🎂 This extension is 2 years old!
- **New**: Option `markdown.extension.list.indentationSize` ([#344](https://github.com/yzhang-gh/vscode-markdown/issues/344)).
- `adaptive`: use 2 spaces indentation for unordered lists, 3 for ordered lists.
- `inherit`: respect the tab size setting of current file.
- **New**: Copy math as TeX command in exported HTML ([#358](https://github.com/yzhang-gh/vscode-markdown/issues/358)).
- **Fix**: Many performance issue ([#181](https://github.com/yzhang-gh/vscode-markdown/issues/181), [#323](https://github.com/yzhang-gh/vscode-markdown/issues/323)).
- **Fix**: Fake heading in YAML front matter ([#343](https://github.com/yzhang-gh/vscode-markdown/issues/343)).
- **Fix**: Math function `\neq` rendering ([#252](https://github.com/yzhang-gh/vscode-markdown/issues/252), [#349](https://github.com/yzhang-gh/vscode-markdown/issues/349)).
- **Fix**: Keybinding for checking/unchecking task list ([#361](https://github.com/yzhang-gh/vscode-markdown/issues/361)).
- **Fix**: Backspace conflicts with Vim extension ([#362](https://github.com/yzhang-gh/vscode-markdown/issues/362)).
- **Fix**: GFM table syntax ([#316](https://github.com/yzhang-gh/vscode-markdown/issues/316)).
Thanks a lot, [Li Yiming (@upupming)](https://github.com/upupming).
---
### 1.8.0 (2018.12.08)
- **New**: Option `markdown.extension.toc.tabSize`, default `auto`. Thanks, [Maël Valais (@maelvalais)](https://github.com/maelvalais).
- **New**: Adaptive indentation size on Tab/Backspace key ([#155](https://github.com/yzhang-gh/vscode-markdown/issues/155), [#241](https://github.com/yzhang-gh/vscode-markdown/issues/241)).
- **New**: Better alignment of cells within tables ([#341](https://github.com/yzhang-gh/vscode-markdown/issues/341)). Thanks, [Sriram Krishna (@k-sriram)](https://github.com/k-sriram).
- **Fix**: Support setext headings in TOC ([#284](https://github.com/yzhang-gh/vscode-markdown/issues/284), [#311](https://github.com/yzhang-gh/vscode-markdown/issues/311)).
- **Fix**: Markdown preview stylesheets priority (VSCode base styles < VSCode preview settings < Custom stylesheets) ([#329](https://github.com/yzhang-gh/vscode-markdown/issues/329)).
- **Fix**: Math completions for untitled document ([#326](https://github.com/yzhang-gh/vscode-markdown/issues/326)).
- **Fix**: Image completions ([#330](https://github.com/yzhang-gh/vscode-markdown/issues/330)).
- **Other**: Use `cmd` instead of `ctrl` for some keybindings on Mac ([#334](https://github.com/yzhang-gh/vscode-markdown/issues/334)).
---
### 1.7.0 (2018.10.27)
- **New**: Math syntax highlight ([#254](https://github.com/yzhang-gh/vscode-markdown/issues/254)). Many thanks, [@linsui](https://github.com/linsui).
- **Fix**: `imgToBase64` option doesn't apply to relative image paths ([#266](https://github.com/yzhang-gh/vscode-markdown/issues/266)).
- **Fix**: TOC generation error `Cannot read property '1' of null` ([#275](https://github.com/yzhang-gh/vscode-markdown/issues/275)).
- **Fix**: Escape HTML markup in code blocks ([#285](https://github.com/yzhang-gh/vscode-markdown/issues/285)).
- **Fix**: Fix false positive TOC detection ([#304](https://github.com/yzhang-gh/vscode-markdown/issues/304)).
- **Other**: Generate HTML with `title` field ([#280](https://github.com/yzhang-gh/vscode-markdown/issues/280)).
- **Other**: Upgrade `KaTeX` to `v0.10.0-rc.1`
---
### 1.6.3 (2018.10.24)
- **Fix**: Table formatter
---
### 1.6.1 (2018.09.10), 1.6.2 (2018.09.19)
- **Fix**: for VSCode v1.28.0-insider (and again)
- **Other**: Remove outline view feature
---
### 1.6.0 (2018.07.22)
- **New**: Add Chinese language support ([#240](https://github.com/yzhang-gh/vscode-markdown/issues/240)). Thanks, [@linsui](https://github.com/linsui).
- **Fix**: Some minor bugs ([#205](https://github.com/yzhang-gh/vscode-markdown/issues/205), [#223](https://github.com/yzhang-gh/vscode-markdown/issues/223), [#231](https://github.com/yzhang-gh/vscode-markdown/issues/231)). Thanks, [Tom Bresson (@tombresson)](https://github.com/tombresson) for #231.
- **Other**: More math completions (in fact, all KaTeX function) ([#219](https://github.com/yzhang-gh/vscode-markdown/issues/219)).
---
### 1.5.1 (2018.06.29)
- **Fix**: Handle activation error for vscode earlier than v1.24.0.
---
### 1.5.0 (2018.06.24)
- **New**: Additional syntax decorations (for strikethrough, code span etc.) and a new plain theme ([#185](https://github.com/yzhang-gh/vscode-markdown/issues/185)).
- **New**: Show image preview along with path intellisense ([#188](https://github.com/yzhang-gh/vscode-markdown/issues/188)).
- **Fix**: Multi-line task list indentation ([#203](https://github.com/yzhang-gh/vscode-markdown/issues/203)).
- **Fix**: Add unique ids to duplicate headings (only when `githubCompatibility` is `true`) ([#211](https://github.com/yzhang-gh/vscode-markdown/issues/211)).
- **Other**: Upgrade KaTeX version ([#196](https://github.com/yzhang-gh/vscode-markdown/issues/196)).

---
### 1.4.0 (2018.05.20)
- **New**: Auto completions! Images paths and math commands
- **New**: Use comment `` to omit specific heading in TOC ([#177](https://github.com/yzhang-gh/vscode-markdown/issues/177)).
- **New**: Option `print.imgToBase64`, encoding images into HTML file ([#73](https://github.com/yzhang-gh/vscode-markdown/issues/73)). Thanks, [Eric Yancey Dauenhauer (@ericyd)](https://github.com/ericyd).
- **Fix**: Regression on table formatting ([#171](https://github.com/yzhang-gh/vscode-markdown/issues/171)). Thanks, [Stefan Zi (@StefanZi)](https://github.com/StefanZi).
- **Fix**: Problem of losing track of TOC after editing the first heading ([#48](https://github.com/yzhang-gh/vscode-markdown/issues/48)).
- **Other**: Remove `quickStylingMode` option. (It's default behavior now)
- **Other**: Provide latest CI build ([here](https://ci.appveyor.com/project/yzhang-gh/vscode-markdown/build/artifacts)).
---
### 1.3.0 (2018.05.06)
- **New**: Automatically fix list markers when editing ordered list ([#32](https://github.com/yzhang-gh/vscode-markdown/issues/32), [#104](https://github.com/yzhang-gh/vscode-markdown/issues/104), [#154](https://github.com/yzhang-gh/vscode-markdown/issues/154)). Thanks, [Eric Yancey Dauenhauer (@ericyd)](https://github.com/ericyd)
- **New**: Keyboard shortcut for toggling math environment (Ctrl + M) ([#165](https://github.com/yzhang-gh/vscode-markdown/issues/165))
- **New**: Command `toggleUnorderedList`, switching between non-list, - , * and + ([#145](https://github.com/yzhang-gh/vscode-markdown/issues/145))
- **Fix**: Tables inside list item will be also formatted now ([#107](https://github.com/yzhang-gh/vscode-markdown/issues/107)). Thanks, [Stefan Zi (@StefanZi)](https://github.com/StefanZi)
- **Fix**: Keybinding (Ctrl + KV) conflicts with command `workbench.action.terminal.clear` ([#161](https://github.com/yzhang-gh/vscode-markdown/issues/161))
- **Other**: Handle Japanese characters when formatting tables ([#153](https://github.com/yzhang-gh/vscode-markdown/issues/153)). Thanks, [Matsuyanagi (@Matsuyanagi)](https://github.com/Matsuyanagi)
- **Other**: Smartly set collapse states when showing outline view ([#149](https://github.com/yzhang-gh/vscode-markdown/issues/149))
#### List Renumbering

#### Keyboard Shortcut for Toggling Math Environment

#### Toggle Unordered List
(assign your desired key binding to `markdown.extension.editing.toggleUnorderedList` first)

---
### 1.2.0 (2018.04.20)
- **New**: Math rendering! (supported in both vscode preview and exported HTML) ([#106](https://github.com/yzhang-gh/vscode-markdown/issues/106))
- **New**: Option `toc.githubCompatibility` (in place of removed `toc.encodeUri` and `toc.toLowerCase`)
- **Fix**: Replace underscore with dash when slugifying ([#147](https://github.com/yzhang-gh/vscode-markdown/issues/147))
- **Other**: Add default keybinding Alt + S to command `toggleStrikethrough` ([#91](https://github.com/yzhang-gh/vscode-markdown/issues/91))
---
### 1.1.2 (2018.04.04)
- **New**: Option `toc.toLowerCase` determining whether or not lowercasing TOC anchors ([#136](https://github.com/yzhang-gh/vscode-markdown/issues/136), [#137](https://github.com/yzhang-gh/vscode-markdown/issues/137). Thanks, [Владислав Люминарский (@Vladislav-Lyuminarskiy)](https://github.com/Vladislav-Lyuminarskiy))
- **Fix**: Handle relative CSS paths in `markdown.styles` setting when printing ([#113](https://github.com/yzhang-gh/vscode-markdown/issues/113))
- **Fix**: TOC now works better with ordered list ([#130](https://github.com/yzhang-gh/vscode-markdown/issues/130), [#131](https://github.com/yzhang-gh/vscode-markdown/issues/131))
- **Fix**: Keybinding conflict between `togglePreview` and `paste` on Linux ([#134](https://github.com/yzhang-gh/vscode-markdown/issues/134))
- **Fix**: Reveal cursor after editing list in case it is out of view ([#138](https://github.com/yzhang-gh/vscode-markdown/issues/138))
---
### 1.1.1 (2018.03.24)
- **New**: Override default "Open Preview" keybinding with "Toggle Preview". Now you can close preview use the same keybinding. ([#86](https://github.com/yzhang-gh/vscode-markdown/issues/86))
- **Fix**: No outline if first-level headiing is missing ([#120](https://github.com/yzhang-gh/vscode-markdown/issues/120))
- **Fix**: List does not continue if a list item starts with URL ([#122](https://github.com/yzhang-gh/vscode-markdown/issues/122))
- **Fix**: `print.absoluteImgPath` option doesn't take effect on some image tags ([#124](https://github.com/yzhang-gh/vscode-markdown/issues/124))
- **Fix**: A bug when formatting table ([#128](https://github.com/yzhang-gh/vscode-markdown/issues/128))
---
### 1.1.0 (2018.03.08)
- **New**: Option `toc.encodeUri` ([#90](https://github.com/yzhang-gh/vscode-markdown/issues/90), [#98](https://github.com/yzhang-gh/vscode-markdown/issues/98))
- **Fix**: TOC detection ([#85](https://github.com/yzhang-gh/vscode-markdown/issues/85), [#102](https://github.com/yzhang-gh/vscode-markdown/issues/102))
- **Fix**: Wrong HTML output path if you are editing `.MD` file ([#105](https://github.com/yzhang-gh/vscode-markdown/issues/105))
### 1.0.5 (2018.02.01)
- **Fix**: Option `markdown.extension.print.absoluteImgPath` doesn't work ([#84](https://github.com/yzhang-gh/vscode-markdown/issues/84))
### 1.0.4 (2018.01.29)
- **Fix**: TOC entries that contain links do not generate correctly ([#83](https://github.com/yzhang-gh/vscode-markdown/issues/83))
### 1.0.3 (2018.01.23)
- **New**: Option `markdown.extension.print.absoluteImgPath` ([#81](https://github.com/yzhang-gh/vscode-markdown/issues/81))
### 1.0.2 (2018.01.15)
- **Fix**: Anchors in exported HTML ([#78](https://github.com/yzhang-gh/vscode-markdown/issues/78))
### 1.0.1 (2018.01.12)
- **Fix**: Conditions to show outline ([#60](https://github.com/yzhang-gh/vscode-markdown/issues/60))
- **Fix**: Respect `insertSpaces` and `tabSize` options of current file when generating TOC ([#77](https://github.com/yzhang-gh/vscode-markdown/issues/77))
### 1.0.0 (2018.01.05)
- **New**: Update outline view on save ([#68](https://github.com/yzhang-gh/vscode-markdown/issues/68))
- **New**: Option `markdown.extension.toc.unorderedList.marker` ([#74](https://github.com/yzhang-gh/vscode-markdown/issues/74))
- **Change**: Use Ctrl + Shift + [ (or ]) to change heading level in Mac ([#71](https://github.com/yzhang-gh/vscode-markdown/issues/71))
- **Fix**: Some fixes you might not notice
### 0.11.2 (2017.11.23)
- **New**: Option `markdown.extension.tableFormatter.enabled` ([#51](https://github.com/yzhang-gh/vscode-markdown/issues/51))
- **Fix**: Show outline only when current doc is Markdown ([#40](https://github.com/yzhang-gh/vscode-markdown/issues/40))
- **Fix**: Now option `editor.tabCompletion` is correctly handled ([#55](https://github.com/yzhang-gh/vscode-markdown/issues/55))
- **Fix**: Now if you export Markdown to HTML, all CSS will be embedded rather than referred ([#57](https://github.com/yzhang-gh/vscode-markdown/issues/57))
### 0.11.1 (2017.11.02)
- **New**: Use Tab/Backspace key to indent/outdent task list ([#50](https://github.com/yzhang-gh/vscode-markdown/issues/50))
### 0.11.0 (2017.10.18)
- **New**: Support GFM task lists (checkbox)
- Press Alt + C to check/uncheck a task list item
- **New**: Add new setting `markdown.extension.showExplorer` to control whether to show outline view in the explorer panel (Thank you, [Ali Karbassi (@karbassi)](https://github.com/karbassi), [PR#44](https://github.com/yzhang-gh/vscode-markdown/pull/44))
- **Preview**: Print to HTML/PDF (work in progress)
### 0.10.3 (2017.09.30)
- **New**: Support GFM checkbox when continuing list item ([#38](https://github.com/yzhang-gh/vscode-markdown/issues/38))
- **Fix**: Unexpected deletion of list marker when deleting leading spaces of a list item ([#39](https://github.com/yzhang-gh/vscode-markdown/issues/39))
### Patches
- **v0.10.2**: Fix `toc == null`
- **v0.10.1**: Update readme
### 0.10.0 (2017.09.24)
- **New**: Outline view ([#36](https://github.com/yzhang-gh/vscode-markdown/issues/36))
- **New**: Toggle strikethrough `~~` with the keybinding you like `markdown.extension.editing.toggleStrikethrough` ([#35](https://github.com/yzhang-gh/vscode-markdown/issues/35))
- **Fix**: Update TOC on save
### 0.9.0 (2017.09.11)
- **New**: Multi-cursor support ([#33](https://github.com/yzhang-gh/vscode-markdown/issues/33))
- **Fix**: Support setext heading syntax on TOC generation ([#30](https://github.com/yzhang-gh/vscode-markdown/issues/30))
- **Fix**: Remove backticks in generated TOC link ([#29](https://github.com/yzhang-gh/vscode-markdown/issues/29))
### 0.8.3 (2017.08.17)
- **Fix**: Respect indentation rules ([#9](https://github.com/yzhang-gh/vscode-markdown/issues/9))
- **Fix**: Handle escaped pipe when formatting GFM table ([#28](https://github.com/yzhang-gh/vscode-markdown/issues/28))
### 0.8.2 (2017.08.07)
- **Fix**: Handle Chinese characters when formatting table ([#26](https://github.com/yzhang-gh/vscode-markdown/issues/26))
- **Fix**: Use the same slugify function with vscode when creating table of contents ([#27](https://github.com/yzhang-gh/vscode-markdown/issues/27))
### 0.8.1 (2017.07.30)
- **New**: Support more than 9 list items and some improvements. Thank you [@rbolsius](https://github.com/rbolsius)
- **Fix**: Wrong formatting when table contains `|` ([#24](https://github.com/yzhang-gh/vscode-markdown/issues/24))
### 0.8.0 (2017.07.26)
- **New**: New setting `markdown.extension.quickStyling`. Quick styling (toggle bold/italic without selecting words) (default `false`)
- **New**: New setting `markdown.extension.italic.indicator` (`*` or `_`)
- **New**: New setting `markdown.extension.toc.levels` controlling the range of TOC levels (syntax `x..y`, default `1..6`)
- **Other**: Add unit tests and continuous integration (Appveyor)
### 0.7.6/7 (2017.07.18/20)
- **Fix**: Fix again (activation events). Finally go back to the legacy activation events (not fancy but robust).
### 0.7.5 (2017.07.15)
- **Fix**: Cannot activate extension when no folder is opened ([#14](https://github.com/yzhang-gh/vscode-markdown/issues/14))
### 0.7.4 (2017.07.14)
- **Fix**: Fix activation events ([#12](https://github.com/yzhang-gh/vscode-markdown/issues/12))
### 0.7.3 (2017.07.11)
- **Fix**: Chinese TOC ([#11](https://github.com/yzhang-gh/vscode-markdown/issues/11))
### 0.7.2 (2017.06.30)
- **Fix**: Adopt normal Enter, Tab and Backspace behaviors in fenced code blocks ([#8](https://github.com/yzhang-gh/vscode-markdown/issues/8))
- **Fix**: Unexpected list continuing
### 0.7.1 (2017.06.24)
- **Fix**: Better TOC detection rules ([#7](https://github.com/yzhang-gh/vscode-markdown/issues/7))
### 0.7.0 (2017.06.10)
- **New**: GFM table formatter
- **New**: Add shortcuts for code spans (Ctrl + `)
- **New**: Remove empty list item when pressing Enter
### 0.6.2 (2017.06.07)
- **Other**: Add marketplace badges; Improve documentation
### 0.6.1 (2017.05.23)
- **Fix**: Ctrl + Enter won't break current line now
- **Other**: Move word completion feature to a standalone extension [Dictionary Completion](https://marketplace.visualstudio.com/items?itemName=yzhang.dictionary-completion)
### 0.6.0 (2017.05.15)
- **New**: Edit lists with Enter, Tab and Backspace
### 0.5.2 (2017.04.17)
- Rollback
### 0.5.1 (2017.04.16)
- ~~**New**: Automatic close Markdown preview when change editor~~
### 0.5.0 (2017.04.13)
- **New**: New shortcut behavior to let cursor jump out of **bold** or *italic* block
Thanks, [Zach Kirkland (@zkirkland)](https://github.com/zkirkland)
### 0.4.4 (2017.03.27)
- **New**: Suggest capitalized words
- **Other**: More words
### 0.4.3
- **Fix**: Word completion, handle `,`, `.`, ...
### 0.4.2
- **Other**: Word completion, more words, more accurate
### 0.4.1
- **Fix**: Typo
### 0.4.0 (2017.02.23)
- **New**: Word completion for frequently used words
- **New**: Continue quote block `>`
### 0.3.0 (2017.02.08)
- ~~**New**: Print your Markdown to PDF~~ (Need more tests for the installation of required library)
- **New**: At the end of a list item, pressing Enter will automatically insert the new list item bullet
- Blank list item won't be continued
- (Planed: Pressing Tab on the blank list item will indent it) (Help wanted)
- **Fix**: LF and CRLF in TOC
- **Other**: Override `blockComment` (`` to <!-- , -->)
### 0.2.0 (2017.01.05)
- **New**: Automatically show preview to side when opening a Markdown file
- **New**: Option for plain text TOC
### 0.1.0
- **New**: Keyboard shortcuts (toggle bold, italic, heading)
- **New**: Table of contents (create, update)
- Options (depth, orderedList, updateOnSave)
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2017 张宇
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Markdown Support for Visual Studio Code
[](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
[](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
[](https://github.com/yzhang-gh/vscode-markdown/actions)
[](https://github.com/yzhang-gh/vscode-markdown)
[](https://github.com/yzhang-gh/vscode-markdown/graphs/contributors)
All you need for Markdown (keyboard shortcuts, table of contents, auto preview and more).
***Note***: VS Code has basic Markdown support out-of-the-box (e.g, **Markdown preview**), please see the [official documentation](https://code.visualstudio.com/docs/languages/markdown) for more information.
**Table of Contents**
- [Features](#features)
- [Keyboard shortcuts](#keyboard-shortcuts)
- [Table of contents](#table-of-contents)
- [List editing](#list-editing)
- [Print Markdown to HTML](#print-markdown-to-html)
- [GitHub Flavored Markdown](#github-flavored-markdown)
- [Math](#math)
- [Auto completions](#auto-completions)
- [Others](#others)
- [Available Commands](#available-commands)
- [Keyboard Shortcuts](#keyboard-shortcuts-1)
- [Supported Settings](#supported-settings)
- [FAQ](#faq)
- [Q: Error "command 'markdown.extension.onXXXKey' not found"](#q-error-command-markdownextensiononxxxkey-not-found)
- [Q: Which Markdown syntax is supported?](#q-which-markdown-syntax-is-supported)
- [Q: This extension has overridden some of my key bindings (e.g. Ctrl + B, Alt + C)](#q-this-extension-has-overridden-some-of-my-key-bindings-eg-ctrl--b-alt--c)
- [Q: The extension is unresponsive, causing lag etc. (performance issues)](#q-the-extension-is-unresponsive-causing-lag-etc-performance-issues)
- [Changelog](#changelog)
- [Latest Development Build](#latest-development-build)
- [Contributing](#contributing)
- [Related](#related)
## Features
### Keyboard shortcuts
(Typo: multiple words)
See full key binding list in the [keyboard shortcuts](#keyboard-shortcuts-1) section
### Table of contents
- Run command "**Create Table of Contents**" (in the [VS Code Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)) to insert a new table of contents.
- The TOC is **automatically updated** on file save by default. To disable, please change the `toc.updateOnSave` option.
- The **indentation type (tab or spaces)** of TOC can be configured per file. Find the setting in the right bottom corner of VS Code's status bar.
***Note***: Be sure to also check the `list.indentationSize` option.
- To make TOC **compatible with GitHub or GitLab**, set option `slugifyMode` accordingly
- Three ways to **control which headings are present** in the TOC:
Click to expand
1. Add `` at the end of a heading to ignore it in TOC\
(It can also be placed above a heading)
2. Use `toc.levels` setting.
3. You can also use the `toc.omittedFromToc` setting to omit some headings (and their subheadings) from TOC:
```js
// In your settings.json
"markdown.extension.toc.omittedFromToc": {
// Use a path relative to your workspace.
"README.md": [
"# Introduction",
"## Also omitted",
],
// Or an absolute path for standalone files.
"/home/foo/Documents/todo-list.md": [
"## Shame list (I'll never do these)",
]
}
```
***Note***:
- Setext headings (underlined with `===` or `---`) can also be omitted, just put their `# ` and `## ` versions in the setting, respectively.
- When omitting heading, **make sure headings within a document are unique**. Duplicate headings may lead to unpredictable behavior.
- Easily add/update/remove **section numbering**
- *In case you are seeing **unexpected TOC recognition**, you can add a `` comment above the list*.
### List editing
***Note***: By default, this extension tries to determine indentation size for different lists according to [CommonMark Spec](https://spec.commonmark.org/0.29/#list-items). If you prefer to use a fixed tab size, please change the `list.indentationSize` setting.
### Print Markdown to HTML
- Commands `Markdown: Print current document to HTML`
and `Markdown: Print documents to HTML` (batch mode)
- **Compatible** with other installed Markdown plugins (e.g. [Markdown Footnotes](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-footnotes)).
The exported HTML should look the same as inside VS Code (except for a few theme colors due to the limitations of APIs).
- Use comment `` (in the first line) to specify a title of the exported HTML.
- Plain links to `.md` files will be converted to `.html`.
- It's recommended to print the exported HTML to PDF with browser (e.g. Chrome) if you want to share your documents with others.
### GitHub Flavored Markdown
- Table formatter
***Note***: The key binding is Ctrl + Shift + I on Linux. See [Visual Studio Code Key Bindings](https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-reference).
- Task lists
### Math
Please use [Markdown+Math](https://marketplace.visualstudio.com/items?itemName=goessner.mdmath) for dedicated math support. Be sure to disable `math.enabled` option of this extension.
### Auto completions
Tip: also support the option `completion.root`
- Images/Files (respects option `search.exclude`)
- Math functions (including option `katex.macros`)
- Reference links
### Others
- Paste link on selected text
- Add "Close Preview" keybinding, which allows you to close the preview tab using the same keybinding of "Open Preview" (Ctrl + Shift + V or Ctrl + KV).
## Available Commands
- Markdown All in One: Create Table of Contents
- Markdown All in One: Update Table of Contents
- Markdown All in One: Add/Update section numbers
- Markdown All in One: Remove section numbers
- Markdown All in One: Toggle code span
- Markdown All in One: Toggle code block
- Markdown All in One: Print current document to HTML
- Markdown All in One: Print documents to HTML
- Markdown All in One: Toggle math environment
- Markdown All in One: Toggle list
- It will cycle through list markers (by default `-`, `*`, `+`, `1.` and `1)`, which can be changed with option `list.toggle.candidate-markers`).
## Keyboard Shortcuts
Table
| Key | Command |
| ---------------------------------------------------------------- | -------------------------------- |
| Ctrl/Cmd + B | Toggle bold |
| Ctrl/Cmd + I | Toggle italic |
| Alt+S (on Windows) | Toggle strikethrough1 |
| Ctrl + Shift + ] | Toggle heading (uplevel) |
| Ctrl + Shift + [ | Toggle heading (downlevel) |
| Ctrl/Cmd + M | Toggle math environment |
| Alt + C | Check/Uncheck task list item |
| Ctrl/Cmd + Shift + V | Toggle preview |
| Ctrl/Cmd + KV | Toggle preview to side |
1. If the cursor is on a list/task item without selection, strikethrough will be added to the whole item (line)
## Supported Settings
Table
| Name | Default | Description |
| ---------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------ |
| `markdown.extension.completion.respectVscodeSearchExclude` | `true` | Whether to consider `search.exclude` option when providing file path completions |
| `markdown.extension.completion.root` | | Root folder when providing file path completions (It takes effect when the path starts with `/`) |
| `markdown.extension.italic.indicator` | `*` | Use `*` or `_` to wrap italic text |
| `markdown.extension.bold.indicator` | `**` | Use `**` or `__` to wrap bold text |
| `markdown.extension.katex.macros` | `{}` | KaTeX macros e.g. `{ "\\name": "expansion", ... }` |
| `markdown.extension.list.indentationSize` | `adaptive` | Use different indentation size for ordered and unordered list |
| `markdown.extension.list.toggle.candidate-markers` | `[ "-", "*", "+", "1.", "1)" ]` | Use a array for toggle ordered list marker e.g. `["*", "1."]` |
| `markdown.extension.orderedList.autoRenumber` | `true` | Auto fix list markers as you edits |
| `markdown.extension.orderedList.marker` | `ordered` | Or `one`: always use `1.` as ordered list marker |
| `markdown.extension.preview.autoShowPreviewToSide` | `false` | Automatically show preview when opening a Markdown file. |
| `markdown.extension.print.absoluteImgPath` | `true` | Convert image path to absolute path |
| `markdown.extension.print.imgToBase64` | `false` | Convert images to base64 when printing to HTML |
| `markdown.extension.print.includeVscodeStylesheets` | `true` | Whether to include VS Code's default styles |
| `markdown.extension.print.onFileSave` | `false` | Print to HTML on file save |
| `markdown.extension.print.theme` | `light` | Theme of the exported HTML |
| `markdown.extension.print.validateUrls` | `true` | Enable/disable URL validation when printing |
| `markdown.extension.syntax.decorations` | `true` | Add decorations to ~~strikethrough~~ and `code span` |
| `markdown.extension.syntax.decorationFileSizeLimit` | 50000 | Don't render syntax decorations if a file is larger than this size (in byte/B) |
| `markdown.extension.syntax.plainTheme` | `false` | A distraction-free theme |
| `markdown.extension.tableFormatter.enabled` | `true` | Enable GFM table formatter |
| `markdown.extension.toc.slugifyMode` | `github` | Slugify mode for TOC link generation (`vscode`, `github`, `gitlab` or `gitea`) |
| `markdown.extension.toc.omittedFromToc` | `{}` | Lists of headings to omit by project file (e.g. `{ "README.md": ["# Introduction"] }`) |
| `markdown.extension.toc.levels` | `1..6` | Control the heading levels to show in the table of contents. |
| `markdown.extension.toc.orderedList` | `false` | Use ordered list in the table of contents. |
| `markdown.extension.toc.plaintext` | `false` | Just plain text. |
| `markdown.extension.toc.unorderedList.marker` | `-` | Use `-`, `*` or `+` in the table of contents (for unordered list) |
| `markdown.extension.toc.updateOnSave` | `true` | Automatically update the table of contents on save. |
## FAQ
#### Q: Error "command 'markdown.extension.onXXXKey' not found"
- In most cases, it is because VS Code **needs a few seconds to load** this extension when you open a Markdown file *for the first time*. (You will see a message "Activating Extensions..." on the status bar.)
- If you still see this "command not found" error after waiting for a long time, please try to **restart** VS Code. If needed, **reinstall** this extension:
1. Uninstall this extension.
2. **Close and restart VS Code. (important!)**
3. Reinstall this extension.
- If it doesn't help, feel free to open a new issue on [GitHub](https://github.com/yzhang-gh/vscode-markdown/issues/new/choose). It would be better if you can report any suspicious error information to us: It's usually in VS Code's menubar **Help** > **Toggle Developer Tools** > **Console**.
- (As a last resort, you may choose to delete `onXXXKey` keys through [VS Code's Keyboard Shortcuts editor](https://code.visualstudio.com/docs/getstarted/keybindings) if you do not need the [list editing feature](https://github.com/yzhang-gh/vscode-markdown#list-editing) at all.)
#### Q: Which Markdown syntax is supported?
- [CommonMark](https://spec.commonmark.org/)
- [Tables](https://help.github.com/articles/organizing-information-with-tables/), [strikethrough](https://help.github.com/articles/basic-writing-and-formatting-syntax/#styling-text) and [task lists](https://docs.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax#task-lists) (from GitHub Flavored Markdown)
- [Math support](https://github.com/waylonflinn/markdown-it-katex#syntax) (from KaTeX)
- [Front matter](https://github.com/ParkSB/markdown-it-front-matter#valid-front-matter)
For other Markdown syntax, you need to install the corresponding extensions from VS Code marketplace (e.g. [Mermaid diagram](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid), [emoji](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-emoji), [footnotes](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-footnotes) and [superscript](https://marketplace.visualstudio.com/items?itemName=DevHawk.markdown-sup)). Once installed, they will take effect in VS Code and also the exported HTML file.
#### Q: This extension has overridden some of my key bindings (e.g. Ctrl + B, Alt + C)
You can easily manage key bindings with [VS Code's **Keyboard Shortcuts** editor](https://code.visualstudio.com/docs/getstarted/keybindings). (Commands provided by this extension have prefix `markdown.extension`.)
#### Q: The extension is unresponsive, causing lag etc. (performance issues)
From experience, there is *a good chance* that the performance issues are caused by *other extensions* (e.g., some spell checker extensions).
This can be verified if you try again with all other extensions disabled (execute `Developer: Reload with Extensions Disabled` or `Extensions: Disable All Installed Extensions for this Workspace` in the VS Code command Palette) and then enable this extension.
To find out the root cause, you can install our [development build](#latest-development-build) (`debug.vsix`) and create a CPU profile following this official [instruction](https://github.com/microsoft/vscode/wiki/Performance-Issues#profile-the-running-extensions) from the VS Code. And then please open a GitHub issue with that profile (`.cpuprofile.txt`) attached.
## Changelog
See [CHANGELOG](CHANGELOG.md) for more information.
## Latest Development Build
Download it [here](https://github.com/yzhang-gh/vscode-markdown/actions/workflows/main.yml?query=event%3Apush+is%3Asuccess), please click the latest passing event to download artifacts.
There are two versions: `markdown-all-in-one-*.vsix` is the regular build, while `debug.vsix` is used to create a verbose CPU profile.
To install, execute `Extensions: Install from VSIX...` in the VS Code Command Palette (`ctrl + shift + p`)
## Contributing
- File bugs, feature requests in [GitHub Issues](https://github.com/yzhang-gh/vscode-markdown/issues).
- Leave a review on [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one#review-details).
- Buy me a coffee ☕ (via [PayPal](https://www.paypal.me/2yzhang), [Alipay or WeChat](donate.md)).
Special thanks to the collaborator [@Lemmingh](https://github.com/Lemmingh) and all other [contributors](https://github.com/yzhang-gh/vscode-markdown/graphs/contributors).
[](https://sourcerer.io/fame/yzhang-gh/yzhang-gh/vscode-markdown/links/0)[](https://sourcerer.io/fame/yzhang-gh/yzhang-gh/vscode-markdown/links/1)[](https://sourcerer.io/fame/yzhang-gh/yzhang-gh/vscode-markdown/links/2)[](https://sourcerer.io/fame/yzhang-gh/yzhang-gh/vscode-markdown/links/3)[](https://sourcerer.io/fame/yzhang-gh/yzhang-gh/vscode-markdown/links/4)[](https://sourcerer.io/fame/yzhang-gh/yzhang-gh/vscode-markdown/links/5)[](https://sourcerer.io/fame/yzhang-gh/yzhang-gh/vscode-markdown/links/6)[](https://sourcerer.io/fame/yzhang-gh/yzhang-gh/vscode-markdown/links/7)
---
## Related
[More extensions of mine](https://marketplace.visualstudio.com/publishers/yzhang)
================================================
FILE: build/build.js
================================================
"use strict";
const { createLogger } = require("./logger.js");
const logger = createLogger("Build");
logger.log("Started.");
// This is not necessarily the last line of the log, as others may also register on the event.
process.on("exit", (code) => logger.log(`${code ? "Failed" : "Passing"}.`));
require("./compilation.js").run();
require("./duplicate-changelog.js").run();
================================================
FILE: build/compilation.js
================================================
// # Notes
//
// We adjust the configurations according to OS environment variables.
// The `mode` reflects the "NODE_ENV", which is a convention established by Express.
// Source map (`devtool`) is expensive and not needed on CI.
//
// The compilation starts when calling `webpack()` with a callback.
// It is async, sequential. The callback is invoked only once.
// https://webpack.js.org/api/node/#multicompiler
"use strict";
const webpack = require("webpack");
const { createLogger } = require("./logger.js");
const logger = createLogger("Compilation");
/**
* @type {boolean}
* @see {@link https://docs.github.com/en/actions/reference/environment-variables}
* @see {@link https://github.com/actions/runner/blob/main/src/Runner.Sdk/ProcessInvoker.cs}
*/
const Env_Is_Ci = process.env["CI"] === "true" || process.env["GITHUB_ACTIONS"] === "true";
/**
* Only distinguish "development" or not.
* @type {"development" | "production"}
*/
const Env_Mode = process.env["NODE_ENV"] === "development" ? "development" : "production";
/**
* @type {webpack.StatsOptions}
*/
const Stats_Options = {
all: false,
assets: true,
children: true,
errors: true,
errorsCount: true,
outputPath: true,
timings: true,
version: true,
warnings: true,
warningsCount: true,
};
/**
* @param {webpack.StatsError} e
*/
const formatCompilationError = (e) => `
ERROR @ ${e.moduleName} (${e.loc})
${e.message}
`;
/**
* @param {webpack.StatsAsset} a
*/
const formatAssetInfo = (a) => `\
${a.type} : ${a.name ?? "[no name]"} \
: ${a.size} bytes \
${a.emitted ? "[emitted]" : a.comparedForEmit ? "[compared for emit]" : ""}\
`;
/**
* Collects and formats stats summary by pre-order traversal.
* The stats tree should be relatively small in real world.
* @param {webpack.StatsCompilation} i - The beginning node.
*/
const formatStatsInfo = (i) => {
let r = i.name
? `
STATS @ ${i.name}
${i.assets?.map(formatAssetInfo).join("\n") ?? "No asset."}
Compiled in ${i.time} ms. Errors: ${i.errorsCount}. Warnings: ${i.warningsCount}.
`
: "";
if (i.children?.length) {
for (const c of i.children) {
r += formatStatsInfo(c);
}
}
return r;
};
const run = () => {
logger.log(`Started. Mode: ${Env_Mode}. CI: ${Env_Is_Ci}.`);
const configs = require("../webpack.config.js");
for (const c of configs) {
c.mode = Env_Mode;
if (Env_Is_Ci) {
c.devtool = false;
}
}
webpack(configs, (err, stats) => {
// `!stats` is just to satisfy type-checking.
if (err || !stats) {
throw err;
}
/** @type {Required} */
// @ts-ignore Too hard to check type. Please debug to inspect it.
const info = stats.toJson(Stats_Options);
logger.append(`webpack ${info.version}`, true, true);
// All errors. Treat warning as error.
if (info.errorsCount || info.warningsCount) {
logger.append([...info.errors, ...info.warnings].map(formatCompilationError).join("\n"));
logger.append(`
Errors: ${info.errorsCount}.
Warnings: ${info.warningsCount}.
`);
}
// Summary of each configuration.
logger.append(formatStatsInfo(info));
logger.flush();
if (info.errorsCount) {
throw new Error("{Compilation} Failed.");
}
logger.log("Passing.");
});
};
module.exports = Object.freeze({ run });
================================================
FILE: build/duplicate-changelog.js
================================================
// # Notes
//
// vsce will modify `README.md` and `CHANGELOG.md` during packaging.
// Thus, we create the `changes.md` for ours to consume.
// Due to relative paths in the file, it has to be under the project root.
"use strict";
const fs = require("fs");
const path = require("path");
const { createLogger } = require("./logger.js");
const logger = createLogger("Duplicate Changelog");
const run = () => {
logger.log("Started.");
const projectRoot = path.resolve(__dirname, "..");
const src = path.resolve(projectRoot, "CHANGELOG.md");
const dest = path.resolve(projectRoot, "changes.md");
logger.log(`\nFrom: ${src}\nTo: ${dest}`);
fs.copyFileSync(src, dest);
logger.log("Passing.");
};
module.exports = Object.freeze({ run });
================================================
FILE: build/logger.js
================================================
"use strict";
class Logger {
/**
* The logger name. Read-only.
* @type {string}
*/
#name;
/**
* The output buffer.
* @type {string[]}
*/
#buffer;
/**
* @param {string} name - Human-readable name of the logger.
*/
constructor(name) {
this.#name = name;
this.#buffer = [];
}
get name() {
return this.#name;
}
/**
* @param {string} message
* @param {boolean} withName
* @param {boolean} withTime
*/
#format(message, withName, withTime) {
// https://2ality.com/2011/10/string-concatenation.html
let result = "";
if (withTime) {
result += `[${new Date().toISOString()}] `;
}
if (withName) {
result += `{${this.#name}} `;
}
result += message;
return result;
}
/**
* Adds a message to the log, which will show on a manual flush.
* A Line Feed will be appended automatically.
* @param {string} message
* @param {boolean} withName - `true` to prepend the logger name.
* @param {boolean} withTime - `true` to prepend timestamp.
*/
append(message, withName = false, withTime = false) {
this.#buffer.push(this.#format(message, withName, withTime));
}
/**
* Flushes the output buffer.
*/
flush() {
if (this.#buffer.length) {
console.log(this.#buffer.join("\n"));
}
this.#buffer.length = 0;
}
/**
* Writes a message to the console immediately, always with timestamp and the logger name.
* @param {string} message
*/
log(message) {
console.log(this.#format(message, true, true));
}
}
/**
* @param {string} label - The logger name representing this output channel.
*/
const createLogger = (label) => {
const logger = new Logger(label);
process.on("exit", () => logger.flush());
return logger;
};
// Sort in alphabetical order.
module.exports = Object.freeze({
createLogger,
});
================================================
FILE: build/tsconfig.json
================================================
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "CommonJS",
"target": "ES2020",
"lib": ["ES2020"],
"allowJs": true,
"checkJs": true,
"noEmit": true
}
}
================================================
FILE: donate.md
================================================
# Buy Me a Coffee ☕
Thank you!
| Alipay | WeChat Pay |
| :------------------------------: | :------------------------------------: |
|  |  |
================================================
FILE: media/checkbox.css
================================================
.task-list-item {
list-style-type: none;
}
.task-list-item-checkbox {
margin-left: -20px;
vertical-align: middle;
pointer-events: none;
}
================================================
FILE: package.json
================================================
{
"name": "markdown-all-in-one",
"displayName": "%ext.displayName%",
"description": "%ext.description%",
"icon": "images/Markdown-mark.png",
"version": "3.6.3",
"publisher": "yzhang",
"engines": {
"vscode": "^1.77.0"
},
"categories": [
"Programming Languages",
"Formatters",
"Other"
],
"keywords": [
"markdown"
],
"bugs": {
"url": "https://github.com/yzhang-gh/vscode-markdown/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/yzhang-gh/vscode-markdown"
},
"license": "MIT",
"activationEvents": [
"onLanguage:markdown",
"onLanguage:rmd",
"onLanguage:quarto",
"workspaceContains:README.md"
],
"main": "./dist/node/main.js",
"contributes": {
"colors": [
{
"id": "markdown.extension.editor.codeSpan.background",
"description": "Background color of code spans in the Markdown editor.",
"defaults": {
"dark": "#00000000",
"light": "#00000000",
"highContrast": "#00000000"
}
},
{
"id": "markdown.extension.editor.codeSpan.border",
"description": "Border color of code spans in the Markdown editor.",
"defaults": {
"dark": "editor.selectionBackground",
"light": "editor.selectionBackground",
"highContrast": "editor.selectionBackground"
}
},
{
"id": "markdown.extension.editor.formattingMark.foreground",
"description": "Color of formatting marks (paragraphs, hard line breaks, links, etc.) in the Markdown editor.",
"defaults": {
"dark": "editorWhitespace.foreground",
"light": "editorWhitespace.foreground",
"highContrast": "diffEditor.insertedTextBorder"
}
},
{
"id": "markdown.extension.editor.trailingSpace.background",
"description": "Background color of trailing space (U+0020) characters in the Markdown editor.",
"defaults": {
"dark": "diffEditor.diagonalFill",
"light": "diffEditor.diagonalFill",
"highContrast": "editorWhitespace.foreground"
}
}
],
"commands": [
{
"command": "markdown.extension.toc.create",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.toc.create.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.toc.update",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.toc.update.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.toc.addSecNumbers",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.toc.addSecNumbers.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.toc.removeSecNumbers",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.toc.removeSecNumbers.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.printToHtml",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.printToHtml.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.printToHtmlBatch",
"enablement": "workspaceFolderCount >= 1",
"title": "%command.printToHtmlBatch.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.editing.toggleCodeSpan",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.editing.toggleCodeSpan.title%",
"icon": "$(code)",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.editing.toggleMath",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.editing.toggleMath.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.editing.toggleMathReverse",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.editing.toggleMathReverse.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.editing.toggleList",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.editing.toggleList.title%",
"icon": "$(list-unordered)",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.editing.toggleCodeBlock",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.editing.toggleCodeBlock.title%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.editing.toggleBold",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.editing.toggleBold%",
"icon": "$(bold)",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.editing.toggleItalic",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.editing.toggleItalic%",
"icon": "$(italic)",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.editing.toggleStrikethrough",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.editing.toggleStrikethrough%",
"category": "Markdown All in One"
},
{
"command": "markdown.extension.checkTaskList",
"enablement": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"title": "%command.checkTaskList%",
"icon": "$(tasklist)",
"category": "Markdown All in One"
}
],
"menus": {
"editor/context": [
{
"command": "markdown.extension.printToHtml",
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"group": "markdown.print@1"
},
{
"command": "markdown.extension.printToHtmlBatch",
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && workspaceFolderCount >= 1",
"group": "markdown.print@2"
}
],
"editor/title": [
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.editing.toggleBold",
"group": "navigation@1"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.editing.toggleItalic",
"group": "navigation@2"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.editing.toggleCodeSpan",
"group": "navigation@3"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.editing.toggleList",
"group": "navigation@4"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.checkTaskList",
"group": "navigation@5"
}
]
},
"keybindings": [
{
"command": "markdown.extension.editing.toggleBold",
"key": "ctrl+b",
"mac": "cmd+b",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/"
},
{
"command": "markdown.extension.editing.toggleItalic",
"key": "ctrl+i",
"mac": "cmd+i",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/"
},
{
"command": "markdown.extension.editing.toggleStrikethrough",
"key": "alt+s",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !isMac"
},
{
"command": "markdown.extension.editing.toggleHeadingUp",
"key": "ctrl+shift+]",
"mac": "ctrl+shift+]",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/"
},
{
"command": "markdown.extension.editing.toggleHeadingDown",
"key": "ctrl+shift+[",
"mac": "ctrl+shift+[",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/"
},
{
"command": "markdown.extension.editing.toggleMath",
"key": "ctrl+m",
"mac": "cmd+m",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/"
},
{
"command": "markdown.extension.onEnterKey",
"key": "enter",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && (!suggestWidgetVisible || config.editor.acceptSuggestionOnEnter == 'off') && !editorHasMultipleSelections && vim.mode != 'Normal' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && vim.mode != 'SearchInProgressMode' && vim.mode != 'CommandlineInProgress' && vim.mode != 'Replace' && vim.mode != 'EasyMotionMode' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'SurroundInputMode' && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
},
{
"command": "markdown.extension.onCtrlEnterKey",
"key": "ctrl+enter",
"mac": "cmd+enter",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && (!suggestWidgetVisible || config.editor.acceptSuggestionOnEnter == 'off') && !editorHasMultipleSelections && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
},
{
"command": "markdown.extension.onShiftEnterKey",
"key": "shift+enter",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && (!suggestWidgetVisible || config.editor.acceptSuggestionOnEnter == 'off') && !editorHasMultipleSelections && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
},
{
"command": "markdown.extension.onTabKey",
"key": "tab",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible && !inlineSuggestionVisible && !editorHasMultipleSelections && !editorTabMovesFocus && !inSnippetMode && !hasSnippetCompletions && !hasOtherSuggestions && markdown.extension.editor.cursor.inList && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !tabShouldJumpToInlineEdit && !tabShouldAcceptInlineEdit"
},
{
"command": "markdown.extension.onShiftTabKey",
"key": "shift+tab",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible && !editorHasMultipleSelections && !editorTabMovesFocus && !inSnippetMode && !hasSnippetCompletions && !hasOtherSuggestions && markdown.extension.editor.cursor.inList && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
},
{
"command": "markdown.extension.onBackspaceKey",
"key": "backspace",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible && !editorHasMultipleSelections && vim.mode != 'Normal' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && vim.mode != 'SearchInProgressMode' && vim.mode != 'CommandlineInProgress' && vim.mode != 'Replace' && vim.mode != 'EasyMotionMode' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'SurroundInputMode' && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
},
{
"command": "markdown.extension.onMoveLineUp",
"key": "alt+up",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible"
},
{
"command": "markdown.extension.onMoveLineDown",
"key": "alt+down",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible"
},
{
"command": "markdown.extension.onCopyLineUp",
"win": "shift+alt+up",
"mac": "shift+alt+up",
"linux": "ctrl+shift+alt+up",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible"
},
{
"command": "markdown.extension.onCopyLineDown",
"win": "shift+alt+down",
"mac": "shift+alt+down",
"linux": "ctrl+shift+alt+down",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible"
},
{
"command": "markdown.extension.onIndentLines",
"key": "ctrl+]",
"mac": "cmd+]",
"when": "editorTextFocus && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible"
},
{
"command": "markdown.extension.onOutdentLines",
"key": "ctrl+[",
"mac": "cmd+[",
"when": "editorTextFocus && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible"
},
{
"command": "markdown.extension.checkTaskList",
"key": "alt+c",
"when": "editorTextFocus && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !isMac"
},
{
"command": "markdown.extension.closePreview",
"key": "ctrl+shift+v",
"mac": "cmd+shift+v",
"when": "activeWebviewPanelId == 'markdown.preview'"
},
{
"command": "markdown.extension.closePreview",
"key": "ctrl+k v",
"mac": "cmd+k v",
"when": "activeWebviewPanelId == 'markdown.preview'"
},
{
"command": "markdown.extension.editing.paste",
"key": "ctrl+v",
"mac": "cmd+v",
"when": "editorTextFocus && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && editorHasSelection"
}
],
"configuration": {
"type": "object",
"title": "%config.title%",
"properties": {
"markdown.extension.completion.enabled": {
"type": "boolean",
"default": false,
"description": "%config.completion.enabled%",
"scope": "resource"
},
"markdown.extension.completion.respectVscodeSearchExclude": {
"type": "boolean",
"default": true,
"markdownDescription": "%config.completion.respectVscodeSearchExclude%",
"scope": "resource"
},
"markdown.extension.completion.root": {
"type": "string",
"default": "",
"description": "%config.completion.root%",
"scope": "resource"
},
"markdown.extension.italic.indicator": {
"type": "string",
"default": "*",
"markdownDescription": "%config.italic.indicator.description%",
"enum": [
"*",
"_"
]
},
"markdown.extension.bold.indicator": {
"type": "string",
"default": "**",
"markdownDescription": "%config.bold.indicator.description%",
"enum": [
"**",
"__"
]
},
"markdown.extension.katex.macros": {
"type": "object",
"default": {},
"description": "%config.katex.macros.description%"
},
"markdown.extension.list.indentationSize": {
"type": "string",
"enum": [
"adaptive",
"inherit"
],
"markdownEnumDescriptions": [
"%config.list.indentationSize.enumDescriptions.adaptive%",
"%config.list.indentationSize.enumDescriptions.inherit%"
],
"default": "adaptive",
"markdownDescription": "%config.list.indentationSize.description%",
"scope": "resource"
},
"markdown.extension.list.toggle.candidate-markers": {
"type": "array",
"default": [
"-",
"*",
"+",
"1.",
"1)"
],
"items": {
"enum": [
"-",
"*",
"+",
"1.",
"1)"
]
},
"minItems": 1,
"maxItems": 5,
"uniqueItems": true,
"description": "%config.list.toggle.candidate-markers.description%"
},
"markdown.extension.math.enabled": {
"type": "boolean",
"default": true,
"description": "%config.math.enabled%"
},
"markdown.extension.orderedList.autoRenumber": {
"type": "boolean",
"default": true,
"description": "%config.orderedList.autoRenumber.description%"
},
"markdown.extension.orderedList.marker": {
"type": "string",
"default": "ordered",
"description": "%config.orderedList.marker.description%",
"enum": [
"one",
"ordered"
],
"markdownEnumDescriptions": [
"%config.orderedList.marker.enumDescriptions.one%",
"%config.orderedList.marker.enumDescriptions.ordered%"
]
},
"markdown.extension.preview.autoShowPreviewToSide": {
"type": "boolean",
"default": false,
"description": "%config.preview.autoShowPreviewToSide.description%"
},
"markdown.extension.print.absoluteImgPath": {
"type": "boolean",
"default": true,
"description": "%config.print.absoluteImgPath.description%",
"scope": "resource"
},
"markdown.extension.print.imgToBase64": {
"type": "boolean",
"default": false,
"description": "%config.print.imgToBase64.description%",
"scope": "resource"
},
"markdown.extension.print.includeVscodeStylesheets": {
"type": "boolean",
"default": true,
"description": "%config.print.includeVscodeStylesheets%"
},
"markdown.extension.print.onFileSave": {
"type": "boolean",
"default": false,
"description": "%config.print.onFileSave.description%",
"scope": "resource"
},
"markdown.extension.print.pureHtml": {
"type": "boolean",
"default": false,
"description": "%config.print.pureHtml.description%",
"scope": "resource"
},
"markdown.extension.print.theme": {
"type": "string",
"default": "light",
"enum": [
"light",
"dark"
],
"description": "%config.print.theme%",
"scope": "resource"
},
"markdown.extension.print.validateUrls": {
"type": "boolean",
"default": true,
"description": "%config.print.validateUrls.description%"
},
"markdown.extension.showActionButtons": {
"type": "boolean",
"default": false,
"description": "%config.showActionButtons.description%"
},
"markdown.extension.syntax.decorations": {
"type": "boolean",
"default": null,
"markdownDeprecationMessage": "%config.syntax.decorations.description%"
},
"markdown.extension.syntax.decorationFileSizeLimit": {
"type": "number",
"default": 50000,
"description": "%config.syntax.decorationFileSizeLimit.description%"
},
"markdown.extension.syntax.plainTheme": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.syntax.plainTheme.description%"
},
"markdown.extension.tableFormatter.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "%config.tableFormatter.enabled.description%"
},
"markdown.extension.tableFormatter.normalizeIndentation": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.tableFormatter.normalizeIndentation.description%"
},
"markdown.extension.tableFormatter.delimiterRowNoPadding": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.tableFormatter.delimiterRowNoPadding.description%"
},
"markdown.extension.theming.decoration.renderCodeSpan": {
"type": "boolean",
"default": true,
"markdownDescription": "%config.theming.decoration.renderCodeSpan.description%",
"scope": "application"
},
"markdown.extension.theming.decoration.renderHardLineBreak": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.theming.decoration.renderHardLineBreak.description%",
"scope": "application"
},
"markdown.extension.theming.decoration.renderLink": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.theming.decoration.renderLink.description%",
"scope": "application"
},
"markdown.extension.theming.decoration.renderParagraph": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.theming.decoration.renderParagraph.description%",
"scope": "application"
},
"markdown.extension.theming.decoration.renderStrikethrough": {
"type": "boolean",
"default": true,
"markdownDescription": "%config.theming.decoration.renderStrikethrough.description%",
"scope": "application"
},
"markdown.extension.theming.decoration.renderTrailingSpace": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.theming.decoration.renderTrailingSpace.description%",
"scope": "application"
},
"markdown.extension.toc.levels": {
"type": "string",
"default": "1..6",
"markdownDescription": "%config.toc.levels.description%",
"pattern": "^[1-6]\\.\\.[1-6]$"
},
"markdown.extension.toc.omittedFromToc": {
"type": "object",
"default": {},
"description": "%config.toc.omittedFromToc.description%"
},
"markdown.extension.toc.orderedList": {
"type": "boolean",
"default": false,
"description": "%config.toc.orderedList.description%"
},
"markdown.extension.toc.plaintext": {
"type": "boolean",
"default": false,
"description": "%config.toc.plaintext.description%"
},
"markdown.extension.toc.slugifyMode": {
"type": "string",
"default": "github",
"markdownDescription": "%config.toc.slugifyMode.description%",
"enum": [
"github",
"azureDevops",
"bitbucket-cloud",
"gitea",
"gitlab",
"vscode",
"zola"
],
"enumDescriptions": [
"GitHub",
"Azure DevOps",
"Bitbucket Cloud",
"Gitea",
"GitLab",
"Visual Studio Code",
"Zola"
]
},
"markdown.extension.toc.unorderedList.marker": {
"type": "string",
"default": "-",
"markdownDescription": "%config.toc.unorderedList.marker.description%",
"enum": [
"-",
"*",
"+"
]
},
"markdown.extension.toc.updateOnSave": {
"type": "boolean",
"default": true,
"description": "%config.toc.updateOnSave.description%"
},
"markdown.extension.extraLangIds": {
"type": "array",
"default": [],
"items": {
"enum": [
"rmd",
"quarto"
]
},
"description": "%config.extraLangIds.description%"
}
}
},
"markdown.markdownItPlugins": true,
"markdown.previewStyles": [
"./media/checkbox.css",
"./node_modules/katex/dist/katex.min.css",
"./node_modules/markdown-it-github-alerts/styles/github-colors-light.css",
"./node_modules/markdown-it-github-alerts/styles/github-colors-dark-media.css",
"./node_modules/markdown-it-github-alerts/styles/github-base.css"
],
"grammars": [
{
"scopeName": "markdown.math_display",
"path": "./syntaxes/math_display.markdown.tmLanguage.json",
"injectTo": [
"text.html.markdown"
]
},
{
"scopeName": "markdown.math_inline",
"path": "./syntaxes/math_inline.markdown.tmLanguage.json",
"injectTo": [
"text.html.markdown"
]
},
{
"scopeName": "text.katex",
"path": "./syntaxes/katex.tmLanguage.json"
}
]
},
"capabilities": {
"virtualWorkspaces": {
"supported": "limited",
"description": "In virtual workspaces, some features may not work well."
}
},
"scripts": {
"vscode:prepublish": "npm run build",
"build": "npm run build-wasm && node ./build/build.js",
"build-wasm": "cd ./src/zola-slug && wasm-pack build --release",
"dev-build": "webpack --mode development",
"dev-compile": "tsc --build --watch --verbose",
"pretest": "tsc --build",
"test": "node ./out/test/runTest.js"
},
"dependencies": {
"@neilsustc/markdown-it-katex": "^1.0.0",
"entities": "^3.0.1",
"grapheme-splitter": "^1.0.4",
"highlight.js": "^11.5.1",
"image-size": "^0.9.3",
"katex": "^0.16.4",
"markdown-it": "^13.0.2",
"markdown-it-github-alerts": "^0.1.2",
"markdown-it-task-lists": "^2.1.1",
"string-similarity": "^4.0.4",
"zola-slug": "file:./src/zola-slug/pkg"
},
"devDependencies": {
"@types/glob": "^7.2.0",
"@types/katex": "^0.14.0",
"@types/markdown-it": "^13.0.7",
"@types/mocha": "^9.1.0",
"@types/node": "~14.18.13",
"@types/string-similarity": "^4.0.0",
"@types/vscode": "~1.63.2",
"@vscode/test-electron": "^1.6.2",
"@vscode/vsce": "^2.26.1",
"glob": "^7.2.0",
"mocha": "^9.2.2",
"ts-loader": "^9.2.8",
"typescript": "~4.5.5",
"webpack": "^5.91.0",
"webpack-cli": "^4.9.2"
}
}
================================================
FILE: package.nls.ja.json
================================================
{
"ext.displayName": "Markdown All in One",
"ext.description": "する事はMarkdownを書くだけでいいのです(キーボードショートカット、目次、自動プレビューなど)",
"command.toc.create.title": "目次(TOC)の作成",
"command.toc.update.title": "目次(TOC)の更新",
"command.toc.addSecNumbers.title": "セクション番号を追加/更新",
"command.toc.removeSecNumbers.title": "セクション番号の除去",
"command.printToHtml.title": "現在のドキュメントをHTMLで出力",
"command.printToHtmlBatch.title": "ドキュメントをHTMLで出力(ソースフォルダを選択)",
"command.editing.toggleCodeSpan.title": "インラインコード構文のトグル",
"command.editing.toggleMath.title": "数式環境のトグル",
"command.editing.toggleMathReverse.title": "数式環境のトグル(逆順)",
"command.editing.toggleList.title": "リスト構文のトグル",
"command.editing.toggleCodeBlock.title": "コードブロック構文のトグル",
"config.title": "Markdown All in One",
"config.completion.respectVscodeSearchExclude": "VS Codeの `#search.exclude#` 設定を使用して、オートコンプリートからファイルを除外する(`node_modules` や、`bower_components` や、`*.code-search` は**常に除外**され、このオプションの影響を受けません)",
"config.completion.root": "Pathを自動補完する際のルートフォルダ",
"config.italic.indicator.description": "斜体テキストの囲いに `*` と `_` のどちらを使用するか",
"config.bold.indicator.description": "太字の囲み文字に `**` と `__` のどちらを使用するか",
"config.katex.macros.description": "ユーザ定義のKaTeXマクロ",
"config.list.indentationSize.description": "リスト構文のインデント形式(TOCの生成にも影響します)\n\nリスト構文のコンテキストによって異なったインデント幅を使用するか、VS Codeにおけるタブのサイズに従うかどうか",
"config.list.indentationSize.enumDescriptions.adaptive": "コンテキストに応じたインデント幅を使用します。**サブ項目をその親の項目に左揃えで配置**させます。例:\n\n```markdown\n- 親項目\n - サブ項目\n\n1. 親項目\n 1. サブ項目\n\n10. マーカーが長い親項目\n 1. サブ項目\n```",
"config.list.indentationSize.enumDescriptions.inherit": "現在のドキュメントに設定されているタブのサイズを使用します(ステータスバーを参照)。例(`tabSize: 4`):\n\n```markdown\n- 親項目\n - サブ項目\n\n1. 親項目\n 1. サブ項目\n\n10. マーカーが長い親項目\n 1. サブ項目\n```",
"config.math.enabled": "基本的な数式のサポートを有効化(KaTeXを使用)",
"config.orderedList.autoRenumber.description": "順序付きリストマーカーの自動修正",
"config.orderedList.marker.description": "順序付きリストのマーカー",
"config.orderedList.marker.enumDescriptions.one": "順序付きリストのマーカーとして、常に `1.` を使用します。",
"config.orderedList.marker.enumDescriptions.ordered": "順序付きリストマーカーとして、増加する連番を使用します。",
"config.preview.autoShowPreviewToSide.description": "自動でプレビューを横に表示する",
"config.print.absoluteImgPath.description": "画像Pathを絶対Pathに変換する",
"config.print.imgToBase64.description": "HTML出力時に画像をbase64へ変換する",
"config.print.includeVscodeStylesheets": "VS Code の基本的な Markdown スタイルを埋め込み、出力された HTML が VS Code 上での表示と同じ見た目になるようにする",
"config.print.onFileSave.description": "ファイル保存時に現在のドキュメントをHTMLへ出力する",
"config.print.theme": "出力時のHTMLテーマ。コードブロック構文にのみ影響します。",
"config.print.validateUrls.description": "出力時のURL検証の有効化/無効化",
"config.syntax.decorations.description": "(**非推奨**)代わりに `#markdown.extension.theming.decoration.renderCodeSpan#` を使用してください。詳細は、 を参照。",
"config.syntax.decorationFileSizeLimit.description": "ファイルが指定のサイズよりも大きい場合(バイト / B単位)、シンタックス装飾はレンダリングされません。",
"config.syntax.plainTheme.description": "(**実験的な機能**)問題の報告はこちらへ:",
"config.tableFormatter.enabled.description": "[GitHub Flavored Markdown](https://github.github.com/gfm/)のテーブルフォーマッターを有効化",
"config.tableFormatter.normalizeIndentation.description": "設定されているタブのサイズに最も近い倍数となるよう、テーブルのインデントを正規化する",
"config.theming.decoration.renderCodeSpan.description": "[インラインコード](https://spec.commonmark.org/0.29/#code-spans)の周囲に境界線を適用する",
"config.theming.decoration.renderHardLineBreak.description": "(**実験的な機能**)",
"config.theming.decoration.renderLink.description": "(**実験的な機能**)",
"config.theming.decoration.renderParagraph.description": "(**実験的な機能**)",
"config.theming.decoration.renderStrikethrough.description": "[取り消し線](https://github.github.com/gfm/#strikethrough-extension-)の中央に線を表示する",
"config.theming.decoration.renderTrailingSpace.description": "[行(Line)](https://spec.commonmark.org/0.29/#line)末尾にある空白文字(U+0020)の背景をシェードする",
"config.toc.levels.description": "目次(TOC)における階層の範囲。 `x..y` と使用すれば、階層 `x` ~ `y` となります。",
"config.toc.omittedFromToc.description": "プロジェクトファイルの目次(TOC)で除外する見出しの一覧。\n例:\n{ \"README.md\": [\"# Introduction\"] }",
"config.toc.orderedList.description": "目次(TOC)に順序付きリストを使用する:\n1. ...\n2. ...",
"config.toc.plaintext.description": "目次(TOC)にプレーンテキスト(リンクなし)を使用する",
"config.toc.slugifyMode.description": "見出しIDの生成方法。これは、**目次(TOC)**、**コード補完**、**出力**における**見出しへのリンク**へ影響します。",
"config.toc.unorderedList.marker.description": "目次(TOC)に `-` 、`*` 、`+` のどれを使用するか(**順序なし**リストの場合)。",
"config.toc.updateOnSave.description": "保存時に目次(TOC)を自動更新する",
"ui.exporting.messageCustomCssNotFound": "'{0}' が見つかりません。",
"ui.exporting.messageExportingInProgress": "{1} 出力中: '{0}'",
"ui.exporting.messageRevertingToImagePaths": "base64エンコードを画像Pathに戻す。",
"ui.general.messageNoValidMarkdownFile": "有効な Markdown ファイルがありません。",
"ui.general.messageUnableToReadFile": "ファイルを読み取れません: '{0}'",
"ui.welcome.buttonDismiss": "却下",
"ui.welcome.buttonOpenLocal": "表示する"
}
================================================
FILE: package.nls.json
================================================
{
"ext.displayName": "Markdown All in One",
"ext.description": "All you need to write Markdown (keyboard shortcuts, table of contents, auto preview and more)",
"command.toc.create.title": "Create Table of Contents",
"command.toc.update.title": "Update Table of Contents",
"command.toc.addSecNumbers.title": "Add/Update section numbers",
"command.toc.removeSecNumbers.title": "Remove section numbers",
"command.printToHtml.title": "Print current document to HTML",
"command.printToHtmlBatch.title": "Print documents to HTML (select a source folder)",
"command.editing.toggleCodeSpan.title": "Toggle code span",
"command.editing.toggleMath.title": "Toggle math environment",
"command.editing.toggleMathReverse.title": "Toggle math environment (in reverse order)",
"command.editing.toggleList.title": "Toggle list",
"command.editing.toggleCodeBlock.title": "Toggle code block",
"command.editing.toggleBold": "Toggle Bold",
"command.editing.toggleItalic": "Toggle Italic",
"command.editing.toggleStrikethrough": "Toggle Strikethrough",
"command.checkTaskList": "Toggle TaskList",
"config.title": "Markdown All in One",
"config.completion.enabled": "Whether to enable auto-completion.",
"config.completion.respectVscodeSearchExclude": "Whether to exclude files from auto-completion using VS Code's `#search.exclude#` setting. (`node_modules`, `bower_components` and `*.code-search` are **always excluded**, not affected by this option.)",
"config.completion.root": "The root folder for path auto-completion.",
"config.italic.indicator.description": "Use `*` or `_` to wrap italic text.",
"config.bold.indicator.description": "Use `**` or `__` to wrap bold text.",
"config.katex.macros.description": "User-defined KaTeX macros.",
"config.list.indentationSize.description": "List indentation scheme. (Also affects TOC generation.)\n\nWhether to use different indentation sizes on different list contexts or stick to VS Code's tab size.",
"config.list.indentationSize.enumDescriptions.adaptive": "Adaptive indentation size according to the context, trying to **left align the sublist with its parent's content**. For example:\n\n```markdown\n- Parent\n - Sublist\n\n1. Parent\n 1. Sublist\n\n10. Parent with longer marker\n 1. Sublist\n```",
"config.list.indentationSize.enumDescriptions.inherit": "Use the configured tab size of the current document (see the status bar). For example (with `tabSize: 4`):\n\n```markdown\n- Parent\n - Sublist\n\n1. Parent\n 1. Sublist\n\n10. Parent with longer marker\n 1. Sublist\n```",
"config.list.toggle.candidate-markers.description": "List candidate markers. It will cycle through those markers",
"config.math.enabled": "Enable basic math support (Powered by KaTeX).",
"config.orderedList.autoRenumber.description": "Auto fix ordered list markers.",
"config.orderedList.marker.description": "Ordered list marker.",
"config.orderedList.marker.enumDescriptions.one": "Always use `1.` as ordered list marker.",
"config.orderedList.marker.enumDescriptions.ordered": "Use increasing numbers as ordered list marker.",
"config.preview.autoShowPreviewToSide.description": "Auto show preview to side.",
"config.print.absoluteImgPath.description": "Convert image path to absolute path.",
"config.print.imgToBase64.description": "Convert images to base64 when printing to HTML.",
"config.print.includeVscodeStylesheets": "Include VS Code's basic Markdown styles so that the exported HTML looks similar as inside VS Code.",
"config.print.onFileSave.description": "Print current document to HTML when file is saved.",
"config.print.pureHtml.description": "Print current document to pure HTML (without any stylesheets).",
"config.print.theme": "Theme of the exported HTML. Only affects code blocks.",
"config.print.validateUrls.description": "Enable/disable URL validation when printing.",
"config.showActionButtons.description": "Show buttons (e.g. toggle bold, italic) on the editor toolbar.",
"config.syntax.decorations.description": "(**Deprecated**) Use `#markdown.extension.theming.decoration.renderCodeSpan#` instead. See for details.",
"config.syntax.decorationFileSizeLimit.description": "If a file is larger than this size (in byte/B), we won't attempt to render syntax decorations.",
"config.syntax.plainTheme.description": "(**Experimental**) Report issue at .",
"config.tableFormatter.enabled.description": "Enable [GitHub Flavored Markdown](https://github.github.com/gfm/) table formatter.",
"config.tableFormatter.normalizeIndentation.description": "Normalize table indentation to closest multiple of configured editor tab size.",
"config.tableFormatter.delimiterRowNoPadding.description": "Don't add padding to the delimiter row.",
"config.theming.decoration.renderCodeSpan.description": "Apply a border around a [code span](https://spec.commonmark.org/0.29/#code-spans).",
"config.theming.decoration.renderHardLineBreak.description": "(**Experimental**)",
"config.theming.decoration.renderLink.description": "(**Experimental**)",
"config.theming.decoration.renderParagraph.description": "(**Experimental**)",
"config.theming.decoration.renderStrikethrough.description": "Show a line through the middle of a [strikethrough](https://github.github.com/gfm/#strikethrough-extension-).",
"config.theming.decoration.renderTrailingSpace.description": "Shade the background of trailing space (U+0020) characters on a [line](https://spec.commonmark.org/0.29/#line).",
"config.toc.levels.description": "Range of levels for table of contents. Use `x..y` for level `x` to `y`.",
"config.toc.omittedFromToc.description": "Lists of headings to omit by project file.\nExample:\n{ \"README.md\": [\"# Introduction\"] }",
"config.toc.orderedList.description": "Use ordered list, that is:\n1. ...\n2. ...",
"config.toc.plaintext.description": "Just plain text TOC, no links.",
"config.toc.slugifyMode.description": "The method to generate heading ID. This affects **links to headings** in **TOC**, **code completion**, and **printing**.",
"config.toc.unorderedList.marker.description": "Use `-`, `*`, or `+` in the table of contents (for **unordered** list).",
"config.toc.updateOnSave.description": "Auto update TOC on save.",
"config.extraLangIds.description": "List of extra supported languages (e.g., rmd, quarto), default [].",
"ui.exporting.messageCustomCssNotFound": "Custom CSS '{0}' not found.",
"ui.exporting.messageExportingInProgress": "Printing '{0}' to {1} ...",
"ui.exporting.messageRevertingToImagePaths": "Reverting to image paths instead of base64 encoding.",
"ui.general.messageNoValidMarkdownFile": "No valid Markdown file.",
"ui.general.messageUnableToReadFile": "Unable to read file '{0}'.",
"ui.welcome.buttonDismiss": "Dismiss",
"ui.welcome.buttonOpenLocal": "Read"
}
================================================
FILE: package.nls.ru-ru.json
================================================
{
"ext.displayName": "Markdown Все в Одном",
"ext.description": "Все что вам нужно для редактирования документов Markdown (Быстрые клавиши, содержание, предпросмотр и много другого)",
"command.toc.create.title": "Создать содержание",
"command.toc.update.title": "ОБновить содержание",
"command.toc.addSecNumbers.title": "Добавить/Обновить номер раздела",
"command.toc.removeSecNumbers.title": "Удалить номер раздела",
"command.printToHtml.title": "Конвертировать текущий документ в HTML",
"command.printToHtmlBatch.title": "Конвертировать документ в HTML (выбрать исходную папку)",
"command.editing.toggleCodeSpan.title": "Переключить код в строке",
"command.editing.toggleMath.title": "Переключить math environment",
"command.editing.toggleMathReverse.title": "Переключить math environment (in reverse order)",
"command.editing.toggleList.title": "Переключить список",
"command.editing.toggleCodeBlock.title": "Переключить блок кода",
"config.title": "Markdown Все в Одном",
"config.completion.respectVscodeSearchExclude": "Нужно ли исключить файлы из поиска для авто-заполнения используя настройку VS Code `#search.exclude#`. (`node_modules`, `bower_components` и `*.code-search` **всегда исключены** и ни как не затронуты этим действием.)",
"config.completion.root": "Корневая папка для авто-заполнения путей.",
"config.italic.indicator.description": "Используйте `*` или `_` создать наклонный текст.",
"config.bold.indicator.description": "Используйте `**` или `__` создать жирный текст.",
"config.katex.macros.description": "Пользовательский KaTeX macros.",
"config.list.indentationSize.description": "Схема отступов для списков. (Так же применяется для генерации содержания (TOC))\n\nНужно ли использовать другой размер отступа, на разных списках или использовать настройки VS Code's для размера отступа.",
"config.list.indentationSize.enumDescriptions.adaptive": "Адаптивный размер отступа согласно контекста, попытка **Выровнять подсписок в лево относительно родителя**. Например:\n\n```markdown\n- Родитель\n - Подсписок\n\n1. Родитель\n 1. Подсписок\n\n10. Родитель с более длинным текстом\n 1. Подсписок\n```",
"config.list.indentationSize.enumDescriptions.inherit": "Использовать размер табуляции текущего документа (смотрите в статусной строке). Например (с `tabSize: 4`):\n\n```markdown\n- Родитель\n - Подсписок\n\n1. Родитель\n 1. Подсписок\n\n10. Родитель wс более длинным текстом\n 1. Подсписок\n```",
"config.list.toggle.candidate-markers.description": "List candidate markers. It will cycle through those markers",
"config.math.enabled": "Активировать поддержку базовой математике (При поддержке KaTeX).",
"config.orderedList.autoRenumber.description": "Автоматически исправлять маркеры сортированного списка.",
"config.orderedList.marker.description": "Сортированный список.",
"config.orderedList.marker.enumDescriptions.one": "Всегда использовать `1.` как маркер сортированного списка.",
"config.orderedList.marker.enumDescriptions.ordered": "Увеличивать нумерацию сортированного списка.",
"config.preview.autoShowPreviewToSide.description": "Автоматически открыть предпросмотр с боку.",
"config.print.absoluteImgPath.description": "Изменить пути к картинкам на абсолютные.",
"config.print.imgToBase64.description": "Конвертировать картинка в Base64 при генерации HTML.",
"config.print.includeVscodeStylesheets": "Использовать базовый стиль VS Code's для Markdown, чтобы экспорт в HTML выглядел так же как и предпросмотр в VS Code.",
"config.print.onFileSave.description": "Сохранить версию в HTML каждый раз когда файл markdown сохранен.",
"config.print.theme": "Тема для экспорта в HTML. Применяется только к блокам кода.",
"config.print.validateUrls.description": "Активировать/отключить проверку URL при экспорте.",
"config.syntax.decorations.description": "(**Устарело**) Используйте `#markdown.extension.theming.decoration.renderCodeSpan#`. Смотрите для подробностей.",
"config.syntax.decorationFileSizeLimit.description": "Если файл больше указного размер (в байтах), мы не будем стараться отрисовать подсветку синтаксиса.",
"config.syntax.plainTheme.description": "(**Эксперимент**) Сообщите о проблеме .",
"config.tableFormatter.enabled.description": "Активировать форматирование таблиц [GitHub Flavored Markdown](https://github.github.com/gfm/).",
"config.tableFormatter.normalizeIndentation.description": "Нормализовать отступы таблиц к ближайшему от настроенного размера табуляции.",
"config.tableFormatter.delimiterRowNoPadding.description": "Не добавлять отступы к строке разделителю.",
"config.theming.decoration.renderCodeSpan.description": "Нарисовать границы вокруг [code span](https://spec.commonmark.org/0.29/#code-spans).",
"config.theming.decoration.renderHardLineBreak.description": "(**Эксперимент**)",
"config.theming.decoration.renderLink.description": "(**Эксперимент**)",
"config.theming.decoration.renderParagraph.description": "(**Эксперимент**)",
"config.theming.decoration.renderStrikethrough.description": "Показать линии через центр [зачеркнуто](https://github.github.com/gfm/#strikethrough-extension-).",
"config.theming.decoration.renderTrailingSpace.description": "Подсветить пробел (U+0020) в конце строки [line](https://spec.commonmark.org/0.29/#line).",
"config.toc.levels.description": "Диапазон уровней для списка содержания. Используйте `x..y` для уровней от `x` до `y`.",
"config.toc.omittedFromToc.description": "Список заголовков игнорировать при генерации содержания всего проекта.\nНапример:\n{ \"README.md\": [\"# Вступление\"] }",
"config.toc.orderedList.description": "Сортированный список, как:\n1. ...\n2. ...",
"config.toc.plaintext.description": "Просто содержание (TOC), без ссылок.",
"config.toc.slugifyMode.description": "Метод генерации ID заголовков. Применяется к **ссылкам на заголовки** в **содержании**, **автозаполнение**, и **печати**.",
"config.toc.unorderedList.marker.description": "Используйте `-`, `*`, или `+` в содержании (ТОС) (для **несортированного** списка).",
"config.toc.updateOnSave.description": "Автоматически обновить содержание (ТОС) при сохранении.",
"config.extraLangIds.description": "Список дополнительно поддерживаемых языков (например: rmd, qmd), по умолчанию [].",
"ui.exporting.messageCustomCssNotFound": "Пользовательский CSS '{0}' не найден.",
"ui.exporting.messageExportingInProgress": "Печатаем '{0}' в {1} ...",
"ui.exporting.messageRevertingToImagePaths": "Вернуть путь к картинке вместо кодирования base64.",
"ui.general.messageNoValidMarkdownFile": "Это файл не Markdown.",
"ui.general.messageUnableToReadFile": "Не могу прочитать файл '{0}'.",
"ui.welcome.buttonDismiss": "Отменить",
"ui.welcome.buttonOpenLocal": "Прочтено"
}
================================================
FILE: package.nls.zh-cn.json
================================================
{
"ext.displayName": "Markdown All in One",
"ext.description": "使用 Markdown 所需要的一切(快捷键,目录,自动预览以及更多功能)",
"command.toc.create.title": "创建目录",
"command.toc.update.title": "更新目录",
"command.toc.addSecNumbers.title": "添加/更新章节序号",
"command.toc.removeSecNumbers.title": "删除章节序号",
"command.printToHtml.title": "将当前文档打印为 HTML",
"command.printToHtmlBatch.title": "批量打印文档为 HTML(选择文件夹)",
"command.editing.toggleCodeSpan.title": "触发代码块",
"command.editing.toggleMath.title": "触发数学环境",
"command.editing.toggleMathReverse.title": "触发数学环境(反向)",
"command.editing.toggleList.title": "触发列表",
"command.editing.toggleCodeBlock.title": "触发代码块",
"config.title": "Markdown All in One",
"config.completion.enabled": "是否启用自动补全。",
"config.completion.respectVscodeSearchExclude": "进行自动补全时是否考虑 VS Code 的 `#search.exclude#` 设置。(`node_modules`,`bower_components` 和 `*.code-search` 将**总是被排除**,不受此选项影响。)",
"config.completion.root": "路径自动补全的根路径。",
"config.italic.indicator.description": "使用 `*` 或 `_` 包围斜体文本。",
"config.bold.indicator.description": "用 `**` 或 `__` 来括住粗体字。",
"config.katex.macros.description": "自定义 KaTeX 宏。",
"config.list.indentationSize.description": "Markdown 列表的缩进大小(包括目录列表)。",
"config.list.indentationSize.enumDescriptions.adaptive": "参考 **CommonMark Spec**,根据上下文判断缩进大小,并尝试**将子级的左端对齐父级的内容的左端**。比如:\n\n```markdown\n- Parent\n - Sublist\n\n1. Parent\n 1. Sublist\n\n10. Parent with longer marker\n 1. Sublist\n```",
"config.list.indentationSize.enumDescriptions.inherit": "使用当前文档设置的缩进量(请查看 VS Code 状态栏)。比如:(`tabSize: 4`)\n\n```markdown\n- Parent\n - Sublist\n\n1. Parent\n 1. Sublist\n\n10. Parent with longer marker\n 1. Sublist\n```",
"config.list.toggle.candidate-markers.description": "可选的列表标记,调整时将循环使用这些标记",
"config.math.enabled": "启用基本的数学支持(由 KaTeX 提供)。",
"config.orderedList.autoRenumber.description": "自动更正有序列表的标号。",
"config.orderedList.marker.description": "有序列表标记。",
"config.orderedList.marker.enumDescriptions.one": "总是使用 `1.` 作为有序列表标记。",
"config.orderedList.marker.enumDescriptions.ordered": "使用递增数字作为有序列表标记。",
"config.preview.autoShowPreviewToSide.description": "自动在另一栏显示预览。",
"config.print.absoluteImgPath.description": "将图片路径转换为绝对路径。",
"config.print.imgToBase64.description": "在打印为 HTML 时将图片转换为 base64。",
"config.print.includeVscodeStylesheets": "输出 HTML 时引用 VS Code 自带的 Markdown 样式,使其与 VS Code 中的预览保持接近。",
"config.print.onFileSave.description": "Markdown 文档保存后自动打印为 HTML。",
"config.print.theme": "输出的 HTML 的样式主题(只影响代码块)。",
"config.print.validateUrls.description": "启用/禁用打印 HTML 时的 URL 验证。",
"config.syntax.decorations.description": "(**已弃用**)改用 `#markdown.extension.theming.decoration.renderCodeSpan#`。请在 查看细节。",
"config.syntax.decorationFileSizeLimit.description": "如果文件大于这个尺寸(byte/B), 我们不再渲染语法装饰器。",
"config.syntax.plainTheme.description": "(**实验性**)请在 报告问题。",
"config.tableFormatter.enabled.description": "启用 [GitHub Flavored Markdown](https://github.github.com/gfm/) 表格格式化。",
"config.tableFormatter.normalizeIndentation.description": "使位于列表内的表格的缩进长度为制表符长度(`tabSize`)。",
"config.tableFormatter.delimiterRowNoPadding.description": "使表格的分隔线 `---` 填满整个单元格。",
"config.theming.decoration.renderCodeSpan.description": "在[行内代码 (code span)](https://spec.commonmark.org/0.29/#code-spans) 周围显示边框。",
"config.theming.decoration.renderHardLineBreak.description": "(**实验性**)",
"config.theming.decoration.renderLink.description": "(**实验性**)",
"config.theming.decoration.renderParagraph.description": "(**实验性**)",
"config.theming.decoration.renderStrikethrough.description": "显示[删除线 (strikethrough)](https://github.github.com/gfm/#strikethrough-extension-)。",
"config.theming.decoration.renderTrailingSpace.description": "为[行](https://spec.commonmark.org/0.29/#line)末端的空格 (U+0020) 字符添加底纹背景。",
"config.toc.levels.description": "目录级别的范围。例如 `2..5` 表示在目录中只包含 2 到 5 级标题。",
"config.toc.omittedFromToc.description": "在指定文件的目录中省略这些标题。\n示例:\n{ \"README.md\": [\"# Introduction\"] }",
"config.toc.orderedList.description": "使用有序列表,即:\n1. ...\n2. ...",
"config.toc.plaintext.description": "使用纯文本目录。",
"config.toc.slugifyMode.description": "生成标题 ID 的方法。该设置影响**目录**、**代码自动补全**、**打印**中**指向标题的链接**。",
"config.toc.unorderedList.marker.description": "在目录中使用 `-`,`*` 或 `+` (仅对于**无序**列表)。",
"config.toc.updateOnSave.description": "保存时自动更新目录。",
"config.extraLangIds.description": "支持的其他语言列表(如rmd, quarto),默认为空。",
"ui.exporting.messageCustomCssNotFound": "自定义样式 '{0}' 未找到。",
"ui.exporting.messageExportingInProgress": "将 '{0}' 打印到 {1} …",
"ui.exporting.messageRevertingToImagePaths": "已使用图像路径而不是 base64 编码。",
"ui.general.messageNoValidMarkdownFile": "未选中有效的 Markdown 文件。",
"ui.general.messageUnableToReadFile": "无法读取文件 '{0}'。",
"ui.welcome.buttonDismiss": "忽略",
"ui.welcome.buttonOpenLocal": "阅读"
}
================================================
FILE: package.nls.zh-tw.json
================================================
{
"ext.displayName": "Markdown All in One",
"ext.description": "使用 Markdown 所需的一切(快捷鍵、目錄、自動預覽以及更多功能)",
"command.toc.create.title": "建立目錄",
"command.toc.update.title": "更新目錄",
"command.toc.addSecNumbers.title": "新增/更新章節編號",
"command.toc.removeSecNumbers.title": "移除章節編號",
"command.printToHtml.title": "將當前文件列印為 HTML",
"command.printToHtmlBatch.title": "批次列印文件為 HTML(選擇來源資料夾)",
"command.editing.toggleCodeSpan.title": "觸發程式碼片段",
"command.editing.toggleMath.title": "觸發數學環境",
"command.editing.toggleMathReverse.title": "觸發數學環境(反向)",
"command.editing.toggleList.title": "觸發清單",
"command.editing.toggleCodeBlock.title": "觸發程式碼區塊",
"command.editing.toggleBold": "觸發粗體",
"command.editing.toggleItalic": "觸發斜體",
"command.editing.toggleStrikethrough": "觸發刪除線",
"command.checkTaskList": "觸發任務清單",
"config.title": "Markdown All in One",
"config.completion.enabled": "是否啟用自動補全。",
"config.completion.respectVscodeSearchExclude": "進行自動補全時是否考慮 VS Code 的 `#search.exclude#` 設定。(`node_modules`、`bower_components` 和 `*.code-search` 將**始終被排除**,不受此選項影響。)",
"config.completion.root": "路徑自動補全的根資料夾。",
"config.italic.indicator.description": "使用 `*` 或 `_` 包圍斜體文字。",
"config.bold.indicator.description": "使用 `**` 或 `__` 包圍粗體文字。",
"config.katex.macros.description": "自訂 KaTeX 巨集。",
"config.list.indentationSize.description": "清單縮排方案。(也影響目錄生成。)\n\n是否根據不同清單上下文使用不同的縮排大小,或遵循 VS Code 的製表符大小。",
"config.list.indentationSize.enumDescriptions.adaptive": "根據上下文自適應縮排大小,嘗試**將子清單的左端對齊父層內容的左端**。例如:\n\n```markdown\n- 父層\n - 子清單\n\n1. 父層\n 1. 子清單\n\n10. 標記較長的父層\n 1. 子清單\n```",
"config.list.indentationSize.enumDescriptions.inherit": "使用當前文件設定的製表符大小(請查看狀態列)。例如(`tabSize: 4`):\n\n```markdown\n- 父層\n - 子清單\n\n1. 父層\n 1. 子清單\n\n10. 標記較長的父層\n 1. 子清單\n```",
"config.list.toggle.candidate-markers.description": "清單候選標記,將循環使用這些標記。",
"config.math.enabled": "啟用基本的數學支援(由 KaTeX 提供)。",
"config.orderedList.autoRenumber.description": "自動修正有序清單標記。",
"config.orderedList.marker.description": "有序清單標記。",
"config.orderedList.marker.enumDescriptions.one": "始終使用 `1.` 作為有序清單標記。",
"config.orderedList.marker.enumDescriptions.ordered": "使用遞增數字作為有序清單標記。",
"config.preview.autoShowPreviewToSide.description": "自動在側邊顯示預覽。",
"config.print.absoluteImgPath.description": "將圖片路徑轉換為絕對路徑。",
"config.print.imgToBase64.description": "在列印為 HTML 時將圖片轉換為 base64。",
"config.print.includeVscodeStylesheets": "輸出 HTML 時引用 VS Code 自帶的 Markdown 樣式,使其與 VS Code 中的預覽保持接近。",
"config.print.onFileSave.description": "文件儲存時自動將當前文件列印為 HTML。",
"config.print.pureHtml.description": "將當前文件列印為純 HTML(不含任何樣式表)。",
"config.print.theme": "輸出的 HTML 樣式主題(僅影響程式碼區塊)。",
"config.print.validateUrls.description": "啟用/停用列印時的 URL 驗證。",
"config.showActionButtons.description": "在編輯器工具列上顯示按鈕(例如觸發粗體、斜體)。",
"config.syntax.decorations.description": "(**已棄用**)改用 `#markdown.extension.theming.decoration.renderCodeSpan#`。請在 查看詳細資訊。",
"config.syntax.decorationFileSizeLimit.description": "如果文件大於此尺寸(byte/B),我們不再渲染語法裝飾器。",
"config.syntax.plainTheme.description": "(**實驗性**)請在 回報問題。",
"config.tableFormatter.enabled.description": "啟用 [GitHub Flavored Markdown](https://github.github.com/gfm/) 表格格式化。",
"config.tableFormatter.normalizeIndentation.description": "將表格縮排標準化為最接近編輯器設定的製表符大小的倍數。",
"config.tableFormatter.delimiterRowNoPadding.description": "不為分隔行添加填充。",
"config.theming.decoration.renderCodeSpan.description": "在[行內程式碼 (code span)](https://spec.commonmark.org/0.29/#code-spans) 周圍顯示邊框。",
"config.theming.decoration.renderHardLineBreak.description": "(**實驗性**)",
"config.theming.decoration.renderLink.description": "(**實驗性**)",
"config.theming.decoration.renderParagraph.description": "(**實驗性**)",
"config.theming.decoration.renderStrikethrough.description": "在[刪除線 (strikethrough)](https://github.github.com/gfm/#strikethrough-extension-) 中間顯示一條線。",
"config.theming.decoration.renderTrailingSpace.description": "為[行](https://spec.commonmark.org/0.29/#line)末端的空格(U+0020)字元添加底紋背景。",
"config.toc.levels.description": "目錄的級別範圍。使用 `x..y` 表示從級別 `x` 到 `y`。",
"config.toc.omittedFromToc.description": "按專案文件省略的標題清單。\n範例:\n{ \"README.md\": [\"# 簡介\"] }",
"config.toc.orderedList.description": "使用有序清單,即:\n1. ...\n2. ...",
"config.toc.plaintext.description": "純文字目錄,不含連結。",
"config.toc.slugifyMode.description": "產生標題 ID 的方法。此設定影響**目錄**、**程式碼自動補全**和**列印**中的**標題連結**。",
"config.toc.unorderedList.marker.description": "在目錄中使用 `-`、`*` 或 `+`(僅適用於**無序**清單)。",
"config.toc.updateOnSave.description": "儲存時自動更新目錄。",
"config.extraLangIds.description": "支援的額外語言清單(例如 rmd、quarto),預設為 []。",
"ui.exporting.messageCustomCssNotFound": "自訂 CSS '{0}' 未找到。",
"ui.exporting.messageExportingInProgress": "將 '{0}' 列印到 {1} ...",
"ui.exporting.messageRevertingToImagePaths": "已使用圖片路徑而非 base64 編碼。",
"ui.general.messageNoValidMarkdownFile": "無有效的 Markdown 文件。",
"ui.general.messageUnableToReadFile": "無法讀取文件 '{0}'。",
"ui.welcome.buttonDismiss": "忽略",
"ui.welcome.buttonOpenLocal": "閱讀"
}
================================================
FILE: src/IDisposable.ts
================================================
"use strict";
/**
* @see
* @see
* @see
*/
export default interface IDisposable {
/**
* Performs application-defined tasks associated with freeing, releasing, or resetting resources.
*/
dispose(): any;
}
================================================
FILE: src/completion.ts
================================================
'use strict'
import * as fs from 'fs';
import sizeOf from 'image-size';
import * as path from 'path';
import { CancellationToken, CompletionContext, CompletionItem, CompletionItemKind, CompletionItemProvider, CompletionList, ExtensionContext, languages, MarkdownString, Position, Range, SnippetString, TextDocument, workspace } from 'vscode';
import { configManager } from "./configuration/manager";
import { getAllTocEntry, IHeading } from './toc';
import { mathEnvCheck } from "./util/contextCheck";
import { Document_Selector_Markdown } from './util/generic';
import * as katexFuncs from './util/katex-funcs';
export function activate(context: ExtensionContext) {
context.subscriptions.push(languages.registerCompletionItemProvider(Document_Selector_Markdown, new MdCompletionItemProvider(), '(', '\\', '/', '[', '#'));
}
interface IReferenceDefinition {
label: string;
usageCount: number;
}
class MdCompletionItemProvider implements CompletionItemProvider {
readonly RXlookbehind = String.raw`(?<=(^[>]? {0,3}\[[ \t\r\n\f\v]*))`; // newline, not quoted, max 3 spaces, open [
readonly RXlinklabel = String.raw`(?([^\]]|(\\\]))*)`; // string for linklabel, allows for /] in linklabel
readonly RXlink = String.raw`(?((<[^>]*>)|([^< \t\r\n\f\v]+)))`; // link either or mylink
readonly RXlinktitle = String.raw`(?[ \t\r\n\f\v]+(("([^"]|(\\"))*")|('([^']|(\\'))*')))?$)`; // optional linktitle in "" or ''
readonly RXlookahead = String.raw`(?=(\]:[ \t\r\n\f\v]*` // close linklabel with ]:
+ this.RXlink + this.RXlinktitle + String.raw`)`; // end regex
readonly RXflags = String.raw`mg`; // multiline & global
// This pattern matches linklabels in link references definitions: [linklabel]: link "link title"
readonly Link_Label_Pattern = new RegExp(this.RXlookbehind + this.RXlinklabel + this.RXlookahead, this.RXflags);
mathCompletions: CompletionItem[];
readonly EXCLUDE_GLOB: string;
constructor() {
// \cmd
let c1 = Array.from(new Set(
[
...katexFuncs.delimiters0, ...katexFuncs.delimeterSizing0,
...katexFuncs.greekLetters0, ...katexFuncs.otherLetters0,
...katexFuncs.spacing0, ...katexFuncs.verticalLayout0,
...katexFuncs.logicAndSetTheory0, ...katexFuncs.macros0, ...katexFuncs.bigOperators0,
...katexFuncs.binaryOperators0, ...katexFuncs.binomialCoefficients0,
...katexFuncs.fractions0, ...katexFuncs.mathOperators0,
...katexFuncs.relations0, ...katexFuncs.negatedRelations0,
...katexFuncs.arrows0, ...katexFuncs.font0, ...katexFuncs.size0,
...katexFuncs.style0, ...katexFuncs.symbolsAndPunctuation0,
...katexFuncs.debugging0
]
)).map(cmd => {
let item = new CompletionItem('\\' + cmd, CompletionItemKind.Function);
item.insertText = cmd;
return item;
});
// \cmd{$1}
let c2 = Array.from(new Set(
[
...katexFuncs.accents1, ...katexFuncs.annotation1,
...katexFuncs.verticalLayout1, ...katexFuncs.overlap1, ...katexFuncs.spacing1,
...katexFuncs.logicAndSetTheory1, ...katexFuncs.mathOperators1, ...katexFuncs.sqrt1,
...katexFuncs.extensibleArrows1, ...katexFuncs.font1,
...katexFuncs.braketNotation1, ...katexFuncs.classAssignment1
]
)).map(cmd => {
let item = new CompletionItem('\\' + cmd, CompletionItemKind.Function);
item.insertText = new SnippetString(`${cmd}\{$1\}`);
return item;
});
// \cmd{$1}{$2}
let c3 = Array.from(new Set(
[
...katexFuncs.verticalLayout2, ...katexFuncs.binomialCoefficients2,
...katexFuncs.fractions2, ...katexFuncs.color2
]
)).map(cmd => {
let item = new CompletionItem('\\' + cmd, CompletionItemKind.Function);
item.insertText = new SnippetString(`${cmd}\{$1\}\{$2\}`);
return item;
});
let envSnippet = new CompletionItem('\\begin', CompletionItemKind.Snippet);
envSnippet.insertText = new SnippetString('begin{${1|' + katexFuncs.envs.join(',') + '|}}\n\t$2\n\\end{$1}');
// Pretend to support multi-workspacefolders
const folder = workspace.workspaceFolders?.[0]?.uri;
// Import macros from configurations
const configMacros = configManager.get("katex.macros", folder);
var macroItems: CompletionItem[] = [];
for (const [cmd, expansion] of Object.entries(configMacros)) {
let item = new CompletionItem(cmd, CompletionItemKind.Function);
// Find the number of arguments in the expansion
let numArgs = 0;
for (let i = 1; i < 10; i++) {
if (!expansion.includes(`#${i}`)) {
numArgs = i - 1;
break;
}
}
item.insertText = new SnippetString(cmd.slice(1) + [...Array(numArgs).keys()].map(i => `\{$${i + 1}\}`).join(""));
macroItems.push(item);
}
this.mathCompletions = [...c1, ...c2, ...c3, envSnippet, ...macroItems];
// Sort
for (const item of this.mathCompletions) {
const label = typeof item.label === "string" ? item.label : item.label.label;
item.sortText = label.replace(/[a-zA-Z]/g, (c) => {
if (/[a-z]/.test(c)) {
return `0${c}`;
} else {
return `1${c.toLowerCase()}`;
}
});
}
const Always_Exclude = ["**/node_modules", "**/bower_components", "**/*.code-search", "**/.git"];
const excludePatterns = new Set(Always_Exclude);
if (configManager.get("completion.respectVscodeSearchExclude", folder)) {
// `search.exclude` is currently not implemented in Theia IDE (which is mostly compatible with VSCode extensions)
// fallback to `files.exclude` (in VSCode, `search.exclude` inherits from `files.exclude`) or an empty list
// see https://github.com/eclipse-theia/theia/issues/13823
const vscodeSearchExclude = configManager.getByAbsolute