Showing preview only (487K chars total). Download the full file or copy to clipboard to get everything.
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.'
---
<!--
⚠ Before proceeding:
Check FAQ (command not found, Markdown syntaxes, performance issues, etc.):
https://github.com/yzhang-gh/vscode-markdown#faq
Test the latest dev build if needed:
https://github.com/yzhang-gh/vscode-markdown/actions/workflows/main.yml?query=event%3Apush+is%3Asuccess
-->
### 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.'
---
<!--
⚠ Before proceeding:
Check FAQ (command not found, Markdown syntaxes, performance issues, etc.):
https://github.com/yzhang-gh/vscode-markdown#faq
-->
### Proposal
### Other information
<!--
(Optional) Give more context to help us understand.
-->
================================================
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 <kbd>Alt</kbd>+<kbd>c</kbd> 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 `<!-- omit from toc -->` to omit a certain section from the table of contents. `<!-- omit in toc -->` 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 `<!-- omit from toc -->` 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 <kbd>Tab</kbd> 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 <kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>Up/Down</kbd> 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 `<!-- title: Your Title Here -->` 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
<p><img src="images/gifs/section-numbers.gif" alt="section numbers" width="768px"></p>
<p><img src="images/md-extension.png" alt="markdown extensions" width="1146px"></p>
- **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 `<!-- omit in toc -->` above a heading ([#495](https://github.com/yzhang-gh/vscode-markdown/issues/495)).
- **New**: Support `<!-- no toc -->` 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**: <kbd>Shift</kbd> + <kbd>Tab</kbd> 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 `<!-- omit in toc -->` 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 <kbd>Backspace</kbd> ([#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**: <kbd>Backspace</kbd> 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 <kbd>Tab</kbd>/<kbd>Backspace</kbd> 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 `<!-- omit in toc -->` 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 (<kbd>Ctrl</kbd> + <kbd>M</kbd>) ([#165](https://github.com/yzhang-gh/vscode-markdown/issues/165))
- **New**: Command `toggleUnorderedList`, switching between non-list, <code>- </code>, <code>* </code> and <code>+ </code> ([#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 (<kbd>Ctrl</kbd> + <kbd>K</kbd> <kbd>V</kbd>) 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 <kbd>Alt</kbd> + <kbd>S</kbd> 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 <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>[</kbd> (or <kbd>]</kbd>) 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 <kbd>Tab</kbd>/<kbd>Backspace</kbd> 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 <kbd>Alt</kbd> + <kbd>C</kbd> 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<del>/PDF</del> (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 <kbd>Enter</kbd>, <kbd>Tab</kbd> and <kbd>Backspace</kbd> 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 (<kbd>Ctrl</kbd> + <kbd>`</kbd>)
- **New**: Remove empty list item when pressing <kbd>Enter</kbd>
### 0.6.2 (2017.06.07)
- **Other**: Add marketplace badges; Improve documentation
### 0.6.1 (2017.05.23)
- **Fix**: <kbd>Ctrl</kbd> + <kbd>Enter</kbd> 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 <kbd>Enter</kbd>, <kbd>Tab</kbd> and <kbd>Backspace</kbd>
### 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 <kbd>Enter</kbd> will automatically insert the new list item bullet
- Blank list item won't be continued
- (Planed: Pressing <kbd>Tab</kbd> on the blank list item will indent it) (Help wanted)
- **Fix**: LF and CRLF in TOC
- **Other**: Override `blockComment` (`<!--`, `-->` to <code><!-- </code>, <code> --></code>)
### 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 <!-- omit in toc -->
[](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. <kbd>Ctrl</kbd> + <kbd>B</kbd>, <kbd>Alt</kbd> + <kbd>C</kbd>)](#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
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/toggle-bold.gif" alt="toggle bold gif" width="282px">
<br>(Typo: multiple words)</p>
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/check-task-list.gif" alt="check task list" width="240px"></p>
See full key binding list in the [keyboard shortcuts](#keyboard-shortcuts-1) section
### Table of contents
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/toc.png" alt="toc" width="305px"></p>
- 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:
<details>
<summary>Click to expand</summary>
1. Add `<!-- omit from toc -->` 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.
</details>
- Easily add/update/remove **section numbering**
<img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/section-numbers.gif" alt="section numbers" width="768px">
- *In case you are seeing **unexpected TOC recognition**, you can add a `<!-- no toc -->` comment above the list*.
### List editing
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/on-enter-key.gif" alt="on enter key" width="214px"></p>
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/tab-backspace.gif" alt="on tab/backspace key" width="214px"></p>
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/fix-marker.gif" alt="fix ordered list markers" width="214px"></p>
***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 `<!-- title: Your Title -->` (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
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/table-formatter.gif" alt="table formatter" width="246px"></p>
***Note***: The key binding is <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>I</kbd> on Linux. See [Visual Studio Code Key Bindings](https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-reference).
- Task lists
### Math
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/math.png" alt="math" width="544px"></p>
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`)
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/image-completions.png" alt="image completions" width="351px"></p>
- Math functions (including option `katex.macros`)
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/math-completions.png" alt="math completions" width="154px"></p>
- Reference links
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/reference-link.png" alt="reference links" width="301px"></p>
### Others
- Paste link on selected text
<p><img src="https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/paste-link.gif" alt="paste link" width="342px"></p>
- Add "Close Preview" keybinding, which allows you to close the preview tab using the same keybinding of "Open Preview" (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> or <kbd>Ctrl</kbd> + <kbd>K</kbd> <kbd>V</kbd>).
## 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
<details>
<summary>Table</summary>
| Key | Command |
| ---------------------------------------------------------------- | -------------------------------- |
| <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>B</kbd> | Toggle bold |
| <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>I</kbd> | Toggle italic |
| <kbd>Alt</kbd>+<kbd>S</kbd> (on Windows) | Toggle strikethrough<sup>1</sup> |
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>]</kbd> | Toggle heading (uplevel) |
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>[</kbd> | Toggle heading (downlevel) |
| <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>M</kbd> | Toggle math environment |
| <kbd>Alt</kbd> + <kbd>C</kbd> | Check/Uncheck task list item |
| <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> | Toggle preview |
| <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>K</kbd> <kbd>V</kbd> | Toggle preview to side |
<sup>1. If the cursor is on a list/task item without selection, strikethrough will be added to the whole item (line)</sup>
</details>
## Supported Settings
<details>
<summary>Table</summary>
| 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. |
</details>
## 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. <kbd>Ctrl</kbd> + <kbd>B</kbd>, <kbd>Alt</kbd> + <kbd>C</kbd>)
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<webpack.StatsCompilation>} */
// @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#` を使用してください。詳細は、<https://github.com/yzhang-gh/vscode-markdown/issues/888> を参照。",
"config.syntax.decorationFileSizeLimit.description": "ファイルが指定のサイズよりも大きい場合(バイト / B単位)、シンタックス装飾はレンダリングされません。",
"config.syntax.plainTheme.description": "(**実験的な機能**)問題の報告はこちらへ:<https://github.com/yzhang-gh/vscode-markdown/issues/185>",
"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 <https://github.com/yzhang-gh/vscode-markdown/issues/888> 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 <https://github.com/yzhang-gh/vscode-markdown/issues/185>.",
"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#`. Смотрите <https://github.com/yzhang-gh/vscode-markdown/issues/888> для подробностей.",
"config.syntax.decorationFileSizeLimit.description": "Если файл больше указного размер (в байтах), мы не будем стараться отрисовать подсветку синтаксиса.",
"config.syntax.plainTheme.description": "(**Эксперимент**) Сообщите о проблеме <https://github.com/yzhang-gh/vscode-markdown/issues/185>.",
"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#`。请在 <https://github.com/yzhang-gh/vscode-markdown/issues/888> 查看细节。",
"config.syntax.decorationFileSizeLimit.description": "如果文件大于这个尺寸(byte/B), 我们不再渲染语法装饰器。",
"config.syntax.plainTheme.description": "(**实验性**)请在 <https://github.com/yzhang-gh/vscode-markdown/issues/185> 报告问题。",
"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#`。請在 <https://github.com/yzhang-gh/vscode-markdown/issues/888> 查看詳細資訊。",
"config.syntax.decorationFileSizeLimit.description": "如果文件大於此尺寸(byte/B),我們不再渲染語法裝飾器。",
"config.syntax.plainTheme.description": "(**實驗性**)請在 <https://github.com/yzhang-gh/vscode-markdown/issues/185> 回報問題。",
"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 <https://code.visualstudio.com/api/references/vscode-api#Disposable>
* @see <https://github.com/dotnet/runtime/blob/master/src/libraries/System.Private.CoreLib/src/System/IDisposable.cs>
* @see <https://referencesource.microsoft.com/#mscorlib/system/idisposable.cs>
*/
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`(?<linklabel>([^\]]|(\\\]))*)`; // string for linklabel, allows for /] in linklabel
readonly RXlink = String.raw`(?<link>((<[^>]*>)|([^< \t\r\n\f\v]+)))`; // link either <mylink> or mylink
readonly RXlinktitle = String.raw`(?<title>[ \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<object>("search.exclude", folder)
?? configManager.getByAbsolute<object>("search.exclude", folder)
?? {};
for (const [pattern, enabled] of Object.entries(vscodeSearchExclude)) {
if (enabled) {
excludePatterns.add(pattern);
}
}
}
this.EXCLUDE_GLOB = "{" + Array.from(excludePatterns).join(",") + "}";
}
async provideCompletionItems(document: TextDocument, position: Position, token: CancellationToken, _context: CompletionContext): Promise<CompletionItem[] | CompletionList<CompletionItem> | undefined> {
const lineTextBefore = document.lineAt(position.line).text.substring(0, position.character);
const lineTextAfter = document.lineAt(position.line).text.substring(position.character);
let matches;
matches = lineTextBefore.match(/\\+$/);
// Math functions
// ==============
if (
// ends with an odd number of backslashes
(matches = lineTextBefore.match(/\\+$/)) !== null
&& matches[0].length % 2 !== 0
) {
if (mathEnvCheck(document, position) === "") {
return [];
} else {
return this.mathCompletions;
}
}
// Reference link labels
// =====================
// e.g. [linklabel]: link "link title"
if (/\[[^\[\]]*$/.test(lineTextBefore)) {
return this.completeRefLinks(document, lineTextBefore, position, token);
}
const enabled = workspace.getConfiguration('markdown.extension.completion', document.uri).get<boolean>('enabled', false);
if (!enabled) {
return [];
}
// Image paths
// ===========
if (/!\[[^\]]*?\]\([^\)]*$/.test(lineTextBefore) || /<img [^>]*src="[^"]*$/.test(lineTextBefore)) {
return this.completeImgPaths(document, lineTextBefore);
}
// Links to heading
// ================
if (
/\[[^\[\]]*?\]\(#[^#\)]*$/.test(lineTextBefore)
|| /^>? {0,3}\[[^\[\]]+?\]\:[ \t\f\v]*#[^#]*$/.test(lineTextBefore)
// /\[[^\]]*\]\((\S*)#[^\)]*$/.test(lineTextBefore) // `[](url#anchor|` Link with anchor.
// || /\[[^\]]*\]\:\s?(\S*)#$/.test(lineTextBefore) // `[]: url#anchor|` Link reference definition with anchor.
) {
return this.completeLinksToHeading(document, position, lineTextBefore, lineTextAfter);
}
// File paths
// ==========
// should be after `completeLinksToHeading`
if (/\[[^\[\]]*?\](?:(?:\([^\)]*)|(?:\:[ \t\f\v]*\S*))$/.test(lineTextBefore)) {
return this.completeFilePaths(lineTextBefore, document);
}
return [];
}
private completeImgPaths(document: TextDocument, lineTextBefore: string) {
if (workspace.getWorkspaceFolder(document.uri) === undefined) return [];
//// 🤔 better name?
let typedDir: string;
if (/!\[[^\]]*?\]\([^\)]*$/.test(lineTextBefore)) {
//// ``
typedDir = lineTextBefore.substr(lineTextBefore.lastIndexOf('](') + 2);
} else {
//// `<img src="dir_here|">`
typedDir = lineTextBefore.substr(lineTextBefore.lastIndexOf('="') + 2);
}
const basePath = getBasepath(document, typedDir);
const isRootedPath = typedDir.startsWith('/');
return workspace.findFiles('**/*.{png,jpg,jpeg,svg,gif,webp}', this.EXCLUDE_GLOB).then(uris => {
const items: CompletionItem[] = [];
for (const imgUri of uris) {
const label = path.relative(basePath, imgUri.fsPath).replace(/\\/g, '/');
if (isRootedPath && label.startsWith("..")) {
continue;
}
let item = new CompletionItem(label.replace(/ /g, '%20'), CompletionItemKind.File);
items.push(item);
//// Add image preview
let dimensions: { width: number; height: number; };
try {
// @ts-ignore Deprecated.
dimensions = sizeOf(imgUri.fsPath);
} catch (error) {
console.error(error);
continue;
}
const maxWidth = 318;
if (dimensions.width > maxWidth) {
dimensions.height = Number(dimensions.height * maxWidth / dimensions.width);
dimensions.width = maxWidth;
}
item.documentation = new MarkdownString(`}|width=${dimensions.width},height=${dimensions.height})`);
item.sortText = label.replace(/\./g, '{');
}
return items;
});
}
private completeRefLinks(document: TextDocument, lineTextBefore: string, position: Position, token: CancellationToken) {
// TODO: may be extracted to a seperate function and used for all completions in the future.
const docText = document.getText();
/**
* NormalizedLabel (upper case) -> IReferenceDefinition
*/
const refDefinitions = new Map<string, IReferenceDefinition>();
for (const match of docText.matchAll(this.Link_Label_Pattern)) {
// Remove leading and trailing whitespace characters.
const label = match[0].replace(/^[ \t\r\n\f\v]+/, '').replace(/[ \t\r\n\f\v]+$/, '');
// For case-insensitive comparison.
const normalizedLabel = label.toUpperCase();
// The one that comes first in the document is used.
if (!refDefinitions.has(normalizedLabel)) {
refDefinitions.set(normalizedLabel, {
label, // Preserve original case in result.
usageCount: 0,
});
}
}
if (refDefinitions.size === 0 || token.isCancellationRequested) {
return;
}
// A confusing feature from #414. Not sure how to get it work.
const docLines = docText.split(/\r?\n/);
for (const crtLine of docLines) {
// Match something that may be a reference link.
const pattern = /\[([^\[\]]+?)\](?![(:\[])/g;
for (const match of crtLine.matchAll(pattern)) {
const label = match[1];
const record = refDefinitions.get(label.toUpperCase());
if (record) {
record.usageCount++;
}
}
}
let startIndex = lineTextBefore.lastIndexOf('[');
const range = new Range(position.with({ character: startIndex + 1 }), position);
if (token.isCancellationRequested) {
return;
}
const completionItems = Array.from<IReferenceDefinition, CompletionItem>(refDefinitions.values(), ref => {
const label = ref.label;
const item = new CompletionItem(label, CompletionItemKind.Reference);
const usages = ref.usageCount;
item.documentation = new MarkdownString(label);
item.detail = usages === 1 ? `1 usage` : `${usages} usages`;
// Prefer unused items. <https://github.com/yzhang-gh/vscode-markdown/pull/414#discussion_r272807189>
item.sortText = usages === 0 ? `0-${label}` : `1-${label}`;
item.range = range;
return item;
});
return completionItems
}
private completeLinksToHeading(document: TextDocument, position: Position, lineTextBefore: string, lineTextAfter: string) {
let startIndex = lineTextBefore.lastIndexOf('#') - 1;
let isLinkRefDefinition = /^>? {0,3}\[[^\[\]]+?\]\:[ \t\f\v]*#[^#]*$/.test(lineTextBefore); // The same as the 2nd conditon above.
let endPosition = position;
let addClosingParen = false;
if (/^([^\) ]+\s*|^\s*)\)/.test(lineTextAfter)) {
// try to detect if user wants to replace a link (i.e. matching closing paren and )
// Either: ... <CURSOR> something <whitespace> )
// or: ... <CURSOR> <whitespace> )
// or: ... <CURSOR> ) (endPosition assignment is a no-op for this case)
// in every case, we want to remove all characters after the cursor and before that first closing paren
endPosition = position.with({ character: + endPosition.character + lineTextAfter.indexOf(')') });
} else {
// If no closing paren is found, replace all trailing non-white-space chars and add a closing paren
// distance to first non-whitespace or EOL
const toReplace = (lineTextAfter.search(/(?<=^\S+)(\s|$)/));
endPosition = position.with({ character: + endPosition.character + toReplace });
if (!isLinkRefDefinition) {
addClosingParen = true;
}
}
const range = new Range(position.with({ character: startIndex + 1 }), endPosition);
return new Promise<CompletionItem[]>((res, _) => {
const toc: readonly Readonly<IHeading>[] = getAllTocEntry(document, { respectMagicCommentOmit: false, respectProjectLevelOmit: false });
const headingCompletions = toc.map<CompletionItem>(heading => {
const item = new CompletionItem('#' + heading.slug, CompletionItemKind.Reference);
if (addClosingParen) {
item.insertText = item.label + ')';
}
item.documentation = heading.rawContent;
item.range = range;
return item;
});
res(headingCompletions);
});
}
private async completeFilePaths(lineTextBefore: string, document: TextDocument) {
const typedDir = lineTextBefore.match(/(?<=((?:\]\()|(?:\]\:))[ \t\f\v]*)\S*$/)![0];
const basePath = getBasepath(document, typedDir);
const isRootedPath = typedDir.startsWith('/');
const files = await workspace.findFiles("**/*", this.EXCLUDE_GLOB);
const items: CompletionItem[] = [];
for (const uri of files) {
const label = path.relative(basePath, uri.fsPath).replace(/\\/g, "/").replace(/ /g, "%20");
if (isRootedPath && label.startsWith("..")) {
continue;
}
const item = new CompletionItem(label, CompletionItemKind.File);
item.sortText = label.replace(/\./g, "{");
items.push(item);
}
return items;
}
}
/**
* @param doc
* @param dir The dir already typed in the src field, e.g. `[alt text](dir_here|)`
*/
function getBasepath(doc: TextDocument, dir: string): string {
if (dir.includes('/')) {
dir = dir.substr(0, dir.lastIndexOf('/') + 1);
} else {
dir = '';
}
let root = workspace.getWorkspaceFolder(doc.uri)!.uri.fsPath;
const rootFolder = workspace.getConfiguration('markdown.extension.completion', doc.uri).get<string>('root', '');
if (rootFolder.length > 0 && fs.existsSync(path.join(root, rootFolder))) {
root = path.join(root, rootFolder);
}
const basePath = path.join(
dir.startsWith('/')
? root
: path.dirname(doc.uri.fsPath),
dir
);
return basePath;
}
================================================
FILE: src/configuration/fallback.ts
================================================
import * as vscode from "vscode";
import { IConfigurationFallbackMap } from "./manager";
import { IConfigurationKeyTypeMap } from "./model";
/**
* Configuration keys that are no longer supported,
* and will be removed in the next major version.
*/
export const Deprecated_Keys = Object.freeze<string>([
"syntax.decorations", //
]);
export const Fallback_Map = Object.freeze<IConfigurationFallbackMap<IConfigurationKeyTypeMap>>({
"theming.decoration.renderCodeSpan": (scope): boolean => {
const config = vscode.workspace.getConfiguration("markdown.extension", scope);
const old = config.get<boolean | null>("syntax.decorations");
if (old === null || old === undefined) {
return config.get<boolean>("theming.decoration.renderCodeSpan")!;
} else {
return old;
}
},
"theming.decoration.renderStrikethrough": (scope): boolean => {
const config = vscode.workspace.getConfiguration("markdown.extension", scope);
const old = config.get<boolean | null>("syntax.decorations");
if (old === null || old === undefined) {
return config.get<boolean>("theming.decoration.renderStrikethrough")!;
} else {
return old;
}
},
});
================================================
FILE: src/configuration/manager.ts
================================================
import * as vscode from "vscode";
import type IDisposable from "../IDisposable";
import { Deprecated_Keys, Fallback_Map } from "./fallback";
export type IConfigurationFallbackMap<M> = { [key in keyof M]?: (scope?: vscode.ConfigurationScope) => M[key] };
export interface IConfigurationService<M> extends IDisposable {
/**
* Gets the value that an our own key denotes.
* @param key The configuration key.
* @param scope The scope, for which the configuration is asked.
*/
get<K extends keyof M>(key: K, scope?: vscode.ConfigurationScope): M[K];
/**
* Gets the value that an absolute identifier denotes.
* @param section The dot-separated identifier (usually a setting ID).
* @param scope The scope, for which the configuration is asked.
*/
getByAbsolute<T>(section: string, scope?: vscode.ConfigurationScope): T | undefined;
}
/**
* This is currently just a proxy that helps mapping our configuration keys.
*/
class ConfigurationManager<M> implements IConfigurationService<M> {
private readonly _fallback: Readonly<IConfigurationFallbackMap<M>>;
constructor(fallback: IConfigurationFallbackMap<M>, deprecatedKeys: readonly string[]) {
this._fallback = Object.isFrozen(fallback) ? fallback : Object.freeze({ ...fallback });
this.showWarning(deprecatedKeys);
}
public dispose(): void { }
/**
* Shows an error message for each deprecated key, to help user migrate.
* This is async to avoid blocking instance creation.
*/
private async showWarning(deprecatedKeys: readonly string[]): Promise<void> {
for (const key of deprecatedKeys) {
const value = vscode.workspace.getConfiguration("markdown.extension").get(key);
if (value !== undefined && value !== null) {
// We are not able to localize this string for now.
// Our NLS module needs to be configured before using, which is done in the extension entry point.
// This module may be directly or indirectly imported by the entry point.
// Thus, this module may be loaded before the NLS module is available.
vscode.window.showErrorMessage(`The setting 'markdown.extension.${key}' has been deprecated.`);
}
}
}
public get<K extends keyof M>(key: K, scope?: vscode.ConfigurationScope): M[K] {
const fallback = this._fallback[key];
if (fallback) {
return fallback(scope);
} else {
return vscode.workspace.getConfiguration("markdown.extension", scope).get<M[K]>(key as string)!;
}
}
public getByAbsolute<T>(section: string, scope?: vscode.ConfigurationScope): T | undefined {
if (section.startsWith("markdown.extension.")) {
return this.get(section.slice(19) as any, scope) as any;
} else {
return vscode.workspace.getConfiguration(undefined, scope).get<T>(section);
}
}
}
export const configManager = new ConfigurationManager(Fallback_Map, Deprecated_Keys);
================================================
FILE: src/configuration/model.ts
================================================
import type { MarkdownBulletListMarker, MarkdownEmphasisIndicator, MarkdownStrongEmphasisIndicator } from "../contract/MarkdownSpec";
import type { SlugifyMode } from "../contract/SlugifyMode";
/**
* A map from our configuration keys to the corresponding type definitions.
* These keys are relative to `markdown.extension`.
* Should keep in sync with `package.json`.
*/
export interface IConfigurationKeyTypeMap {
"completion.enabled": string;
"completion.respectVscodeSearchExclude": boolean;
"completion.root": string;
"italic.indicator": MarkdownEmphasisIndicator;
"bold.indicator": MarkdownStrongEmphasisIndicator;
/**
* A collection of custom macros.
* @see {@link https://katex.org/docs/options.html}
*/
"katex.macros": { [key: string]: string };
"list.indentationSize": "adaptive" | "inherit";
"math.enabled": boolean;
"orderedList.autoRenumber": boolean;
"orderedList.marker": "one" | "ordered";
"preview.autoShowPreviewToSide": boolean;
"print.absoluteImgPath": boolean;
"print.imgToBase64": boolean;
"print.includeVscodeStylesheets": boolean;
"print.onFileSave": boolean;
"print.theme": "dark" | "light";
"print.validateUrls": boolean;
/** To be superseded. */
"syntax.decorationFileSizeLimit": number;
/** To be superseded. */
"syntax.plainTheme": boolean;
"tableFormatter.enabled": boolean;
"tableFormatter.normalizeIndentation": boolean;
"tableFormatter.delimiterRowNoPadding": boolean;
/** Formerly "syntax.decorations" */
"theming.decoration.renderCodeSpan": boolean;
"theming.decoration.renderHardLineBreak": boolean;
"theming.decoration.renderLink": boolean;
"theming.decoration.renderParagraph": boolean;
/** Formerly "syntax.decorations" */
"theming.decoration.renderStrikethrough": boolean;
"theming.decoration.renderTrailingSpace": boolean;
"toc.levels": string;
/** To be superseded. */
"toc.omittedFromToc": { [path: string]: string[] };
"toc.orderedList": boolean;
"toc.plaintext": boolean;
"toc.slugifyMode": SlugifyMode;
"toc.unorderedList.marker": MarkdownBulletListMarker;
"toc.updateOnSave": boolean;
}
/**
* Configuration keys that this product contributes.
* These keys are relative to `markdown.extension`.
*/
export type IConfigurationKnownKey = keyof IConfigurationKeyTypeMap;
================================================
FILE: src/contract/LanguageIdentifier.ts
================================================
"use strict";
/**
* Well-known language identifiers.
* @see <https://code.visualstudio.com/docs/languages/identifiers>
*/
const enum LanguageIdentifier {
Html = "html",
Json = "json",
Markdown = "markdown",
PlainText = "plaintext",
}
export default LanguageIdentifier;
================================================
FILE: src/contract/MarkdownSpec.ts
================================================
"use strict";
// The name of types here begins with `Markdown`.
/**
* CommonMark bullet list marker.
* https://spec.commonmark.org/0.29/#list-items
*/
export const enum MarkdownBulletListMarker {
Asterisk = "*",
Hyphen = "-",
Plus = "+",
}
/**
* CommonMark emphasis indicator.
* https://spec.commonmark.org/0.29/#emphasis-and-strong-emphasis
*/
export const enum MarkdownEmphasisIndicator {
Asterisk = "*",
Underscore = "_",
}
/**
* CommonMark strong emphasis indicator.
* https://spec.commonmark.org/0.29/#emphasis-and-strong-emphasis
*/
export const enum MarkdownStrongEmphasisIndicator {
Asterisk = "**",
Underscore = "__",
}
/**
* The heading level allowed by the CommonMark Spec.
* https://spec.commonmark.org/0.29/#atx-headings
*/
export type MarkdownHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
================================================
FILE: src/contract/README.md
================================================
# Top-level contracts and constants
## Conventions
### General
Very few things are allowed to be under this directory. They are not scoped to a few specific modules, instead, must be globally recognized and used across the whole product, and well-known outside our codebase.
Currently, here are:
* Well-known constants.
* Public API definitions, aka public contracts.
### Naming
* The name of files, types, enum members, constants must match the [StrictPascalCase](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md#format) format.
* Names here are globally uniquely recognized, that is, once a name is assigned to a type here, no other identifier can have the same name in our codebase.
* If a file holds only one type, then it may only provide the [default export](https://www.typescriptlang.org/docs/handbook/modules.html#default-exports), and the type must be of the same name as the file.
* If a file holds multiple types, then the types must be under the same topic, which is the file name.
### Organization
* Each file must be a module.
* Only the following are allowed:
* [Const enum](https://www.typescriptlang.org/docs/handbook/enums.html#const-enums).
* [Interface](https://www.typescriptlang.org/docs/handbook/interfaces.html).
* [Literal](https://www.typescriptlang.org/docs/handbook/literal-types.html).
* [Type alias](https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-aliases).
* Sort in alphabetical order whenever possible.
================================================
FILE: src/contract/SlugifyMode.ts
================================================
/**
* Slugify mode.
*/
export const enum SlugifyMode {
/** Azure DevOps */
AzureDevOps = "azureDevops",
/** Bitbucket Cloud */
BitbucketCloud = "bitbucket-cloud",
/** Gitea */
Gitea = "gitea",
/** GitHub */
GitHub = "github",
/** GitLab */
GitLab = "gitlab",
/** Visual Studio Code */
VisualStudioCode = "vscode",
/** Zola */
Zola = "zola",
}
export default SlugifyMode;
================================================
FILE: src/contract/VisualStudioCodeLocaleId.ts
================================================
"use strict";
/**
* Visual Studio Code Locale ID.
* @see <https://code.visualstudio.com/docs/getstarted/locales#_available-locales>
* @see <https://github.com/microsoft/vscode-loc>
*/
const enum VisualStudioCodeLocaleId {
Bulgarian = "bg",
ChineseSimplified = "zh-cn",
ChineseTraditional = "zh-tw",
Czech = "cs",
English = "en",
French = "fr",
German = "de",
Hungarian = "hu",
Italian = "it",
Japanese = "ja",
Korean = "ko",
PortugueseBrazil = "pt-br",
Russian = "ru",
Spanish = "es",
Turkish = "tr",
}
export default VisualStudioCodeLocaleId;
================================================
FILE: src/editor-context-service/context-service-in-fenced-code-block.ts
================================================
'use strict'
import { ExtensionContext, Position, TextDocument, window } from 'vscode';
import { AbsContextService } from "./i-context-service";
import { isInFencedCodeBlock } from "../util/contextCheck";
export class ContextServiceEditorInFencedCodeBlock extends AbsContextService {
public contextName: string = "markdown.extension.editor.cursor.inFencedCodeBlock";
public onActivate(_context: ExtensionContext) {
// set initial state of context
this.setState(false);
}
public dispose(): void { }
public onDidChangeActiveTextEditor(document: TextDocument, cursorPos: Position) {
this.updateContextState(document, cursorPos);
}
public onDidChangeTextEditorSelection(document: TextDocument, cursorPos: Position) {
this.updateContextState(document, cursorPos);
}
private updateContextState(document: TextDocument, cursorPos: Position) {
if (isInFencedCodeBlock(document, cursorPos.line)) {
this.setState(true);
}
else {
this.setState(false);
}
return;
}
}
================================================
FILE: src/editor-context-service/context-service-in-list.ts
================================================
'use strict'
import { ExtensionContext, Position, TextDocument, window } from 'vscode';
import { AbsContextService } from "./i-context-service";
export class ContextServiceEditorInList extends AbsContextService {
public contextName: string = "markdown.extension.editor.cursor.inList";
public onActivate(_context: ExtensionContext) {
// set initial state of context
this.setState(false);
}
public dispose(): void { }
public onDidChangeActiveTextEditor(document: TextDocument, cursorPos: Position) {
this.updateContextState(document, cursorPos);
}
public onDidChangeTextEditorSelection(document: TextDocument, cursorPos: Position) {
this.updateContextState(document, cursorPos);
}
private updateContextState(document: TextDocument, cursorPos: Position) {
let lineText = document.lineAt(cursorPos.line).text;
let inList = /^\s*([-+*]|[0-9]+[.)]) +(\[[ x]\] +)?/.test(lineText);
if (inList) {
this.setState(true);
}
else {
this.setState(false);
}
return;
}
}
================================================
FILE: src/editor-context-service/context-service-in-math-env.ts
================================================
'use strict'
import { ExtensionContext, Position, TextDocument, window } from 'vscode';
import { AbsContextService } from "./i-context-service";
import { mathEnvCheck } from "../util/contextCheck";
export class ContextServiceEditorInMathEn extends AbsContextService {
public contextName: string = "markdown.extension.editor.cursor.inMathEnv";
public onActivate(_context: ExtensionContext) {
// set initial state of context
this.setState(false);
}
public dispose(): void { }
public onDidChangeActiveTextEditor(document: TextDocument, cursorPos: Position) {
this.updateContextState(document, cursorPos);
}
public onDidChangeTextEditorSelection(document: TextDocument, cursorPos: Position) {
this.updateContextState(document, cursorPos);
}
private updateContextState(document: TextDocument, cursorPos: Position) {
if (mathEnvCheck(document, cursorPos)) {
this.setState(true);
}
else {
this.setState(false);
}
return;
}
}
================================================
FILE: src/editor-context-service/i-context-service.ts
================================================
'use strict'
import { commands, ExtensionContext, Position, TextDocument } from 'vscode';
import type IDisposable from "../IDisposable";
interface IContextService extends IDisposable {
onActivate(context: ExtensionContext): void;
/**
* handler of onDidChangeActiveTextEditor
* implement this method to handle that event to update context state
*/
onDidChangeActiveTextEditor(document: TextDocument, cursorPos: Position): void;
/**
* handler of onDidChangeTextEditorSelection
* implement this method to handle that event to update context state
*/
onDidChangeTextEditorSelection(document: TextDocument, cursorPos: Position): void;
}
export abstract class AbsContextService implements IContextService {
public abstract readonly contextName: string;
/**
* activate context service
* @param context ExtensionContext
*/
public abstract onActivate(context: ExtensionContext): void;
public abstract dispose(): void;
/**
* default handler of onDidChangeActiveTextEditor, do nothing.
* override this method to handle that event to update context state.
*/
public abstract onDidChangeActiveTextEditor(document: TextDocument, cursorPos: Position): void;
/**
* default handler of onDidChangeTextEditorSelection, do nothing.
* override this method to handle that event to update context state.
*/
public abstract onDidChangeTextEditorSelection(document: TextDocument, cursorPos: Position): void;
/**
* set state of context
*/
protected setState(state: any) {
commands.executeCommand('setContext', this.contextName, state);
}
}
================================================
FILE: src/editor-context-service/manager.ts
================================================
'use strict'
import type IDisposable from "../IDisposable";
import { ExtensionContext, window } from 'vscode';
import { AbsContextService } from "./i-context-service";
import { ContextServiceEditorInList } from "./context-service-in-list";
import { ContextServiceEditorInFencedCodeBlock } from "./context-service-in-fenced-code-block";
import { ContextServiceEditorInMathEn } from "./context-service-in-math-env";
export class ContextServiceManager implements IDisposable {
private readonly contextServices: Array<AbsContextService> = [];
public constructor() {
// push context services
this.contextServices.push(new ContextServiceEditorInList());
this.contextServices.push(new ContextServiceEditorInFencedCodeBlock());
this.contextServices.push(new ContextServiceEditorInMathEn());
}
public activate(context: ExtensionContext) {
for (const service of this.contextServices) {
service.onActivate(context);
}
// subscribe update handler for context
context.subscriptions.push(
window.onDidChangeActiveTextEditor(() => this.onDidChangeActiveTextEditor()),
window.onDidChangeTextEditorSelection(() => this.onDidChangeTextEditorSelection())
);
// initialize context state
this.onDidChangeActiveTextEditor();
}
public dispose(): void {
while (this.contextServices.length > 0) {
const service = this.contextServices.pop();
service!.dispose();
}
}
private onDidChangeActiveTextEditor() {
const editor = window.activeTextEditor;
if (editor === undefined) {
return;
}
const cursorPos = editor.selection.start;
const document = editor.document;
for (const service of this.contextServices) {
service.onDidChangeActiveTextEditor(document, cursorPos);
}
}
private onDidChangeTextEditorSelection() {
const editor = window.activeTextEditor;
if (editor === undefined) {
return;
}
const cursorPos = editor.selection.start;
const document = editor.document;
for (const service of this.contextServices) {
service.onDidChangeTextEditorSelection(document, cursorPos);
}
}
}
export const contextServiceManager = new ContextServiceManager();
================================================
FILE: src/extension.ts
================================================
'use strict';
import { ExtensionContext, languages, Uri, window, workspace } from 'vscode';
import { configManager } from "./configuration/manager";
import { contextServiceManager } from "./editor-context-service/manager"
import { decorationManager } from "./theming/decorationManager";
import * as completion from './completion';
import * as formatting from './formatting';
import * as listEditing from './listEditing';
import { commonMarkEngine, MarkdownIt, mdEngine } from "./markdownEngine";
import { extendMarkdownIt } from "./markdown-it-plugin-provider";
import { config as configNls, localize } from './nls';
import resolveResource from "./nls/resolveResource";
import * as preview from './preview';
import * as print from './print';
import * as tableFormatter from './tableFormatter';
import * as toc from './toc';
import { importZolaSlug } from './util/slugify';
export function activate(context: ExtensionContext) {
configNls({ extensionContext: context });
context.subscriptions.push(
configManager, contextServiceManager, decorationManager, commonMarkEngine, mdEngine
);
// wasm modules need to be imported asynchronously (or any modules relying on them synchronously need to be imported asynchronously)
importZolaSlug().then(() => {
// we need to wait for the wasm module to be loaded before we can use it, it should only take a few milliseconds
// if we move the activateMdExt function outside of this promise, slugify might be called before the wasm module has loaded which will cause it to fail
activateMdExt(context);
});
return { extendMarkdownIt };
}
function activateMdExt(context: ExtensionContext) {
// Context services
contextServiceManager.activate(context);
// Override `Enter`, `Tab` and `Backspace` keys
listEditing.activate(context);
// Shortcuts
formatting.activate(context);
// Toc
toc.activate(context);
// Images paths and math commands completions
completion.activate(context);
// Print to PDF
print.activate(context);
// Table formatter
tableFormatter.activate(context);
// Auto show preview to side
preview.activate(context);
// Allow `*` in word pattern for quick styling (toggle bold/italic without selection)
// original https://github.com/microsoft/vscode/blob/3e5c7e2c570a729e664253baceaf443b69e82da6/extensions/markdown-basics/language-configuration.json#L55
languages.setLanguageConfiguration('markdown', {
wordPattern: /([*_]{1,2}|~~|`+)?[\p{Alphabetic}\p{Number}\p{Nonspacing_Mark}]+(_+[\p{Alphabetic}\p{Number}\p{Nonspacing_Mark}]+)*\1/gu
});
showWelcome(context);
}
/**
* Shows a welcome message on first time startup.
*/
async function showWelcome(context: ExtensionContext): Promise<void> {
const welcomeDirUri = Uri.joinPath(context.extensionUri, "welcome");
// The directory for an extension is recreated every time VS Code installs it.
// Thus, we only need to read and write an empty flag file there.
// If the file exists, then it's not the first time, and we don't need to do anything.
const flagFileUri = Uri.joinPath(welcomeDirUri, "WELCOMED");
try {
await workspace.fs.stat(flagFileUri);
return;
} catch {
workspace.fs.writeFile(flagFileUri, new Uint8Array()).then(() => { }, () => { });
}
// The existence of welcome materials depends on build options we set during pre-publish.
// If any condition is not met, then we don't need to do anything.
try {
// Confirm the message is valid.
// `locale` should be a string. But here we keep it `any` to suppress type checking.
const locale: any = JSON.parse(process.env.VSCODE_NLS_CONFIG as string).locale;
const welcomeMessageFileUri = Uri.file(resolveResource(welcomeDirUri.fsPath, "", ".txt", [locale, "en"], "")![0]);
const msgWelcome = Buffer.from(await workspace.fs.readFile(welcomeMessageFileUri)).toString("utf8");
if (/^\s*$/.test(msgWelcome) || /\p{C}/u.test(msgWelcome)) {
return;
}
// Confirm the file exists.
const changelogFileUri = Uri.joinPath(context.extensionUri, "changes.md");
await workspace.fs.stat(changelogFileUri);
const btnDismiss = localize("ui.welcome.buttonDismiss");
const btnOpenLocal = localize("ui.welcome.buttonOpenLocal");
window.showInformationMessage(msgWelcome, btnOpenLocal, btnDismiss).then(selection => {
switch (selection) {
case btnOpenLocal:
workspace.openTextDocument(changelogFileUri).then(window.showTextDocument);
return;
}
});
} catch { }
}
export function deactivate() { }
================================================
FILE: src/formatting.ts
================================================
'use strict';
import { commands, env, ExtensionContext, Position, Range, Selection, SnippetString, TextDocument, TextEditor, window, workspace, WorkspaceEdit } from 'vscode';
import { fixMarker } from './listEditing';
export function activate(context: ExtensionContext) {
context.subscriptions.push(
commands.registerCommand('markdown.extension.editing.toggleBold', () => toggleEmphasis(EmphasisType.BOLD)),
commands.registerCommand('markdown.extension.editing.toggleItalic', () => toggleEmphasis(EmphasisType.ITALIC)),
commands.registerCommand('markdown.extension.editing.toggleCodeSpan', toggleCodeSpan),
commands.registerCommand('markdown.extension.editing.toggleStrikethrough', toggleStrikethrough),
commands.registerCommand('markdown.extension.editing.toggleMath', () => toggleMath(transTable)),
commands.registerCommand('markdown.extension.editing.toggleMathReverse', () => toggleMath(reverseTransTable)),
commands.registerCommand('markdown.extension.editing.toggleHeadingUp', toggleHeadingUp),
commands.registerCommand('markdown.extension.editing.toggleHeadingDown', toggleHeadingDown),
commands.registerCommand('markdown.extension.editing.toggleList', toggleList),
commands.registerCommand('markdown.extension.editing.toggleCodeBlock', toggleCodeBlock),
commands.registerCommand('markdown.extension.editing.paste', paste),
commands.registerCommand('markdown.extension.editing._wrapBy', args => styleByWrapping(args['before'], args['after']))
);
}
/**
* Here we store Regexp to check if the text is the single link.
*/
const singleLinkRegex: RegExp = createLinkRegex();
// Return Promise because need to chain operations in unit tests
enum EmphasisType {
ITALIC,
BOLD
}
function toggleEmphasis(type: EmphasisType) {
let indicator = workspace.getConfiguration('markdown.extension.' + EmphasisType[type].toLowerCase()).get<string>('indicator')!;
return styleByWrapping(indicator);
}
function toggleCodeSpan() {
return styleByWrapping('`');
}
function toggleCodeBlock() {
const editor = window.activeTextEditor!;
return editor.insertSnippet(new SnippetString('```$0\n$TM_SELECTED_TEXT\n```'));
}
function toggleStrikethrough() {
return styleByWrapping('~~');
}
async function toggleHeadingUp() {
const editor = window.activeTextEditor!;
let lineIndex = editor.selection.active.line;
let lineText = editor.document.lineAt(lineIndex).text;
return await editor.edit((editBuilder) => {
if (!lineText.startsWith('#')) { // Not a heading
editBuilder.insert(new Position(lineIndex, 0), '# ');
}
else if (!lineText.startsWith('######')) { // Already a heading (but not level 6)
editBuilder.insert(new Position(lineIndex, 0), '#');
}
});
}
function toggleHeadingDown() {
const editor = window.activeTextEditor!;
let lineIndex = editor.selection.active.line;
let lineText = editor.document.lineAt(lineIndex).text;
editor.edit((editBuilder) => {
if (lineText.startsWith('# ')) { // Heading level 1
editBuilder.delete(new Range(new Position(lineIndex, 0), new Position(lineIndex, 2)));
}
else if (lineText.startsWith('#')) { // Heading (but not level 1)
editBuilder.delete(new Range(new Position(lineIndex, 0), new Position(lineIndex, 1)));
}
});
}
enum MathBlockState {
// State 1: not in any others states
NONE,
// State 2: $|$
INLINE,
// State 3: $$ | $$
SINGLE_DISPLAYED,
// State 4:
// $$
// |
// $$
MULTI_DISPLAYED
}
function getMathState(editor: TextEditor, cursor: Position): MathBlockState {
if (getContext(editor, cursor, '$', '$') === '$|$') {
return MathBlockState.INLINE;
} else if (getContext(editor, cursor, '$$ ', ' $$') === '$$ | $$') {
return MathBlockState.SINGLE_DISPLAYED;
} else if (
editor.document.lineAt(cursor.line).text === ''
&& cursor.line > 0
&& editor.document.lineAt(cursor.line - 1).text.endsWith('$$')
&& cursor.line < editor.document.lineCount - 1
&& editor.document.lineAt(cursor.line + 1).text.startsWith('$$')
) {
return MathBlockState.MULTI_DISPLAYED
} else {
return MathBlockState.NONE;
}
}
/**
* Modify the document, change from `oldMathBlockState` to `newMathBlockState`.
* @param editor
* @param cursor
* @param oldMathBlockState
* @param newMathBlockState
*/
function setMathState(editor: TextEditor, cursor: Position, oldMathBlockState: MathBlockState, newMathBlockState: MathBlockState) {
// Step 1: Delete old math block.
editor.edit(editBuilder => {
let rangeToBeDeleted: Range
switch (oldMathBlockState) {
case MathBlockState.NONE:
rangeToBeDeleted = new Range(cursor, cursor);
break;
case MathBlockState.INLINE:
rangeToBeDeleted = new Range(new Position(cursor.line, cursor.character - 1), new Position(cursor.line, cursor.character + 1));
break;
case MathBlockState.SINGLE_DISPLAYED:
rangeToBeDeleted = new Range(new Position(cursor.line, cursor.character - 3), new Position(cursor.line, cursor.character + 3));
break;
case MathBlockState.MULTI_DISPLAYED:
const startCharIndex = editor.document.lineAt(cursor.line - 1).text.length - 2;
rangeToBeDeleted = new Range(new Position(cursor.line - 1, startCharIndex), new Position(cursor.line + 1, 2));
break;
}
editBuilder.delete(rangeToBeDeleted)
}).then(() => {
// Step 2: Insert new math block.
editor.edit(editBuilder => {
let newCursor = editor.selection.active;
let stringToBeInserted: string
switch (newMathBlockState) {
case MathBlockState.NONE:
stringToBeIns
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
SYMBOL INDEX (251 symbols across 41 files)
FILE: build/logger.js
class Logger (line 3) | class Logger {
method constructor (line 19) | constructor(name) {
method name (line 25) | get name() {
method #format (line 34) | #format(message, withName, withTime) {
method append (line 58) | append(message, withName = false, withTime = false) {
method flush (line 65) | flush() {
method log (line 76) | log(message) {
FILE: src/IDisposable.ts
type IDisposable (line 8) | interface IDisposable {
FILE: src/completion.ts
function activate (line 13) | function activate(context: ExtensionContext) {
type IReferenceDefinition (line 17) | interface IReferenceDefinition {
class MdCompletionItemProvider (line 22) | class MdCompletionItemProvider implements CompletionItemProvider {
method constructor (line 38) | constructor() {
method provideCompletionItems (line 142) | async provideCompletionItems(document: TextDocument, position: Positio...
method completeImgPaths (line 201) | private completeImgPaths(document: TextDocument, lineTextBefore: strin...
method completeRefLinks (line 252) | private completeRefLinks(document: TextDocument, lineTextBefore: strin...
method completeLinksToHeading (line 315) | private completeLinksToHeading(document: TextDocument, position: Posit...
method completeFilePaths (line 360) | private async completeFilePaths(lineTextBefore: string, document: Text...
function getBasepath (line 387) | function getBasepath(doc: TextDocument, dir: string): string {
FILE: src/configuration/manager.ts
type IConfigurationFallbackMap (line 5) | type IConfigurationFallbackMap<M> = { [key in keyof M]?: (scope?: vscode...
type IConfigurationService (line 7) | interface IConfigurationService<M> extends IDisposable {
class ConfigurationManager (line 26) | class ConfigurationManager<M> implements IConfigurationService<M> {
method constructor (line 29) | constructor(fallback: IConfigurationFallbackMap<M>, deprecatedKeys: re...
method dispose (line 34) | public dispose(): void { }
method showWarning (line 40) | private async showWarning(deprecatedKeys: readonly string[]): Promise<...
method get (line 53) | public get<K extends keyof M>(key: K, scope?: vscode.ConfigurationScop...
method getByAbsolute (line 62) | public getByAbsolute<T>(section: string, scope?: vscode.ConfigurationS...
FILE: src/configuration/model.ts
type IConfigurationKeyTypeMap (line 9) | interface IConfigurationKeyTypeMap {
type IConfigurationKnownKey (line 71) | type IConfigurationKnownKey = keyof IConfigurationKeyTypeMap;
FILE: src/contract/LanguageIdentifier.ts
type LanguageIdentifier (line 7) | const enum LanguageIdentifier {
FILE: src/contract/MarkdownSpec.ts
type MarkdownBulletListMarker (line 9) | const enum MarkdownBulletListMarker {
type MarkdownEmphasisIndicator (line 19) | const enum MarkdownEmphasisIndicator {
type MarkdownStrongEmphasisIndicator (line 28) | const enum MarkdownStrongEmphasisIndicator {
type MarkdownHeadingLevel (line 37) | type MarkdownHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
FILE: src/contract/SlugifyMode.ts
type SlugifyMode (line 4) | const enum SlugifyMode {
FILE: src/contract/VisualStudioCodeLocaleId.ts
type VisualStudioCodeLocaleId (line 8) | const enum VisualStudioCodeLocaleId {
FILE: src/editor-context-service/context-service-in-fenced-code-block.ts
class ContextServiceEditorInFencedCodeBlock (line 7) | class ContextServiceEditorInFencedCodeBlock extends AbsContextService {
method onActivate (line 10) | public onActivate(_context: ExtensionContext) {
method dispose (line 15) | public dispose(): void { }
method onDidChangeActiveTextEditor (line 17) | public onDidChangeActiveTextEditor(document: TextDocument, cursorPos: ...
method onDidChangeTextEditorSelection (line 21) | public onDidChangeTextEditorSelection(document: TextDocument, cursorPo...
method updateContextState (line 25) | private updateContextState(document: TextDocument, cursorPos: Position) {
FILE: src/editor-context-service/context-service-in-list.ts
class ContextServiceEditorInList (line 6) | class ContextServiceEditorInList extends AbsContextService {
method onActivate (line 9) | public onActivate(_context: ExtensionContext) {
method dispose (line 14) | public dispose(): void { }
method onDidChangeActiveTextEditor (line 16) | public onDidChangeActiveTextEditor(document: TextDocument, cursorPos: ...
method onDidChangeTextEditorSelection (line 20) | public onDidChangeTextEditorSelection(document: TextDocument, cursorPo...
method updateContextState (line 24) | private updateContextState(document: TextDocument, cursorPos: Position) {
FILE: src/editor-context-service/context-service-in-math-env.ts
class ContextServiceEditorInMathEn (line 7) | class ContextServiceEditorInMathEn extends AbsContextService {
method onActivate (line 10) | public onActivate(_context: ExtensionContext) {
method dispose (line 15) | public dispose(): void { }
method onDidChangeActiveTextEditor (line 17) | public onDidChangeActiveTextEditor(document: TextDocument, cursorPos: ...
method onDidChangeTextEditorSelection (line 21) | public onDidChangeTextEditorSelection(document: TextDocument, cursorPo...
method updateContextState (line 25) | private updateContextState(document: TextDocument, cursorPos: Position) {
FILE: src/editor-context-service/i-context-service.ts
type IContextService (line 6) | interface IContextService extends IDisposable {
method setState (line 46) | protected setState(state: any) {
FILE: src/editor-context-service/manager.ts
class ContextServiceManager (line 10) | class ContextServiceManager implements IDisposable {
method constructor (line 13) | public constructor() {
method activate (line 20) | public activate(context: ExtensionContext) {
method dispose (line 33) | public dispose(): void {
method onDidChangeActiveTextEditor (line 40) | private onDidChangeActiveTextEditor() {
method onDidChangeTextEditorSelection (line 54) | private onDidChangeTextEditorSelection() {
FILE: src/extension.ts
function activate (line 20) | function activate(context: ExtensionContext) {
function activateMdExt (line 37) | function activateMdExt(context: ExtensionContext) {
function showWelcome (line 67) | async function showWelcome(context: ExtensionContext): Promise<void> {
function deactivate (line 110) | function deactivate() { }
FILE: src/formatting.ts
function activate (line 6) | function activate(context: ExtensionContext) {
type EmphasisType (line 30) | enum EmphasisType {
function toggleEmphasis (line 35) | function toggleEmphasis(type: EmphasisType) {
function toggleCodeSpan (line 40) | function toggleCodeSpan() {
function toggleCodeBlock (line 44) | function toggleCodeBlock() {
function toggleStrikethrough (line 49) | function toggleStrikethrough() {
function toggleHeadingUp (line 53) | async function toggleHeadingUp() {
function toggleHeadingDown (line 68) | function toggleHeadingDown() {
type MathBlockState (line 83) | enum MathBlockState {
function getMathState (line 97) | function getMathState(editor: TextEditor, cursor: Position): MathBlockSt...
function setMathState (line 122) | function setMathState(editor: TextEditor, cursor: Position, oldMathBlock...
function toggleMath (line 193) | function toggleMath(transTable: MathBlockState[]) {
function toggleList (line 203) | function toggleList() {
function toggleListSingleLine (line 221) | function toggleListSingleLine(doc: TextDocument, line: number, wsEdit: W...
type ListMarker (line 239) | enum ListMarker {
function getListMarker (line 248) | function getListMarker(listMarker: string): ListMarker {
function getMarkerEndCharacter (line 269) | function getMarkerEndCharacter(currentMarker: ListMarker, lineText: stri...
function getCurrentListStart (line 292) | function getCurrentListStart(lineTextContent: string): ListMarker {
function getNextListStart (line 311) | function getNextListStart(current: ListMarker): ListMarker {
function getCandidateMarkers (line 323) | function getCandidateMarkers(): ListMarker[] {
function paste (line 337) | async function paste() {
function createLinkRegex (line 355) | function createLinkRegex(): RegExp {
function isSingleLink (line 399) | function isSingleLink(text: string): boolean {
function styleByWrapping (line 404) | function styleByWrapping(startPattern: string, endPattern = startPattern) {
function wrapRange (line 470) | function wrapRange(editor: TextEditor, wsEdit: WorkspaceEdit, shifts: [P...
function isWrapped (line 530) | function isWrapped(text: string, startPattern: string, endPattern: strin...
function getContext (line 534) | function getContext(editor: TextEditor, cursorPos: Position, startPatter...
FILE: src/listEditing.ts
type IModifier (line 4) | type IModifier = "ctrl" | "shift";
function activate (line 6) | function activate(context: ExtensionContext) {
function onEnterKey (line 27) | function onEnterKey(modifiers?: IModifier) {
function onTabKey (line 181) | function onTabKey(modifiers?: IModifier) {
function onBackspaceKey (line 205) | function onBackspaceKey() {
function asNormal (line 229) | function asNormal(editor: TextEditor, key: "backspace" | "enter" | "tab"...
function indent (line 261) | function indent(editor: TextEditor) {
function outdent (line 285) | function outdent(editor: TextEditor) {
function tryDetermineIndentationSize (line 313) | function tryDetermineIndentationSize(editor: TextEditor, line: number, c...
function findNextMarkerLineNumber (line 333) | function findNextMarkerLineNumber(editor: TextEditor, line = editor.sele...
function lookUpwardForMarker (line 358) | function lookUpwardForMarker(editor: TextEditor, line: number, currentIn...
function fixMarker (line 403) | function fixMarker(editor: TextEditor, line?: number): Thenable<unknown>...
function deleteRange (line 457) | function deleteRange(editor: TextEditor, range: Range): Thenable<boolean> {
function checkTaskList (line 467) | function checkTaskList(): Thenable<unknown> | void {
function onMoveLineUp (line 516) | function onMoveLineUp() {
function onMoveLineDown (line 522) | function onMoveLineDown() {
function onCopyLineUp (line 528) | function onCopyLineUp() {
function onCopyLineDown (line 534) | function onCopyLineDown() {
function onIndentLines (line 540) | function onIndentLines() {
function onOutdentLines (line 545) | function onOutdentLines() {
function deactivate (line 550) | function deactivate() { }
FILE: src/markdown-it-plugin-provider.ts
function extendMarkdownIt (line 10) | function extendMarkdownIt(md: MarkdownIt): MarkdownIt {
FILE: src/markdownEngine.ts
type DocumentToken (line 19) | interface DocumentToken {
type IMarkdownEngine (line 39) | interface IMarkdownEngine extends IDisposable {
type IDynamicMarkdownEngine (line 52) | interface IDynamicMarkdownEngine extends IMarkdownEngine {
type IStaticMarkdownEngine (line 57) | interface IStaticMarkdownEngine extends IMarkdownEngine {
class CommonMarkEngine (line 76) | class CommonMarkEngine implements IStaticMarkdownEngine {
method engine (line 84) | public get engine(): MarkdownIt {
method constructor (line 88) | constructor() {
method dispose (line 100) | public dispose(): void {
method getDocumentToken (line 108) | public getDocumentToken(document: vscode.TextDocument): DocumentToken {
method getEngine (line 132) | public async getEngine() {
class MarkdownEngine (line 137) | class MarkdownEngine implements IDynamicMarkdownEngine {
method constructor (line 152) | constructor() {
method dispose (line 173) | public dispose(): void {
method getDocumentToken (line 181) | public async getDocumentToken(document: vscode.TextDocument): Promise<...
method getEngine (line 200) | public async getEngine() {
method newEngine (line 207) | private async newEngine() {
method render (line 249) | public async render(text: string, config: vscode.WorkspaceConfiguratio...
method addNamedHeaders (line 265) | private addNamedHeaders(md: MarkdownIt): void {
function normalizeHighlightLang (line 299) | function normalizeHighlightLang(lang: string): string {
FILE: src/markdownExtensions.ts
type IVscodeMarkdownExtension (line 16) | interface IVscodeMarkdownExtension
type IMarkdownContribution (line 47) | interface IMarkdownContribution {
type IFuncMarkdownContributionTransformer (line 58) | interface IFuncMarkdownContributionTransformer {
function getContributedMarkdownItPlugin (line 70) | function getContributedMarkdownItPlugin(extension: IVscodeMarkdownExtens...
function resolveExtensionResourceUris (line 88) | function resolveExtensionResourceUris(
function resolveMarkdownContribution (line 104) | function resolveMarkdownContribution(extension: IVscodeMarkdownExtension...
type IMarkdownContributionProvider (line 158) | interface IMarkdownContributionProvider extends vscode.Disposable {
class MarkdownContributionProvider (line 166) | class MarkdownContributionProvider implements IMarkdownContributionProvi...
method constructor (line 177) | public constructor() {
method dispose (line 189) | public dispose(): void {
method contributions (line 202) | public get contributions() {
function getMarkdownContributionProvider (line 227) | function getMarkdownContributionProvider(): IMarkdownContributionProvider {
FILE: src/nls/index.ts
type Primitive (line 8) | type Primitive = string | number | bigint | boolean | symbol | undefined...
type IConfigOption (line 10) | interface IConfigOption {
type IFuncLocalize (line 15) | interface IFuncLocalize {
type IInternalOption (line 24) | interface IInternalOption {
type INlsBundle (line 44) | interface INlsBundle {
type IVscodeNlsConfig (line 50) | interface IVscodeNlsConfig {
function readJsonFile (line 59) | function readJsonFile<T = any>(path: string): T {
function cacheBundle (line 83) | function cacheBundle(locales: VisualStudioCodeLocaleId[] = []): void {
function format (line 104) | function format(message: string, ...args: Primitive[]): string {
function config (line 136) | function config(opts: IConfigOption) {
FILE: src/nls/resolveResource.ts
function resolveResource (line 43) | function resolveResource(
FILE: src/preview.ts
function activate (line 23) | function activate(context: vscode.ExtensionContext) {
function registerAutoPreview (line 52) | function registerAutoPreview() {
function triggerAutoPreview (line 57) | function triggerAutoPreview(editor: vscode.TextEditor | undefined): void {
function autoPreviewToSide (line 80) | async function autoPreviewToSide(editor: vscode.TextEditor) {
FILE: src/print.ts
function activate (line 13) | function activate(context: ExtensionContext) {
function deactivate (line 22) | function deactivate() { }
function onDidSave (line 24) | function onDidSave(doc: TextDocument) {
function print (line 33) | async function print(type: string, uri?: Uri, outFolder?: string) {
function batchPrint (line 184) | function batchPrint() {
function hasMathEnv (line 213) | function hasMathEnv(text: string) {
function wrapWithStyleTag (line 218) | function wrapWithStyleTag(src: string) {
function readCss (line 226) | function readCss(fileName: string) {
function getStyles (line 236) | function getStyles(uri: Uri, hasMathEnv: boolean, includeVscodeStyles: b...
function getCustomStyleSheets (line 258) | function getCustomStyleSheets(resource: Uri): string[] {
function relToAbsPath (line 278) | function relToAbsPath(resource: Uri, href: string): string {
function getPreviewSettingStyles (line 287) | function getPreviewSettingStyles(): string {
function getPreviewExtensionStyles (line 302) | async function getPreviewExtensionStyles() {
function getPreviewExtensionScripts (line 322) | async function getPreviewExtensionScripts() {
FILE: src/syntaxDecorations.ts
type DecorationType (line 12) | const enum DecorationType {
function activate (line 79) | function activate(context: vscode.ExtensionContext) {
function triggerUpdateDecorations (line 102) | function triggerUpdateDecorations(editor: vscode.TextEditor | undefined) {
function clearDecorations (line 116) | function clearDecorations(editor: vscode.TextEditor) {
function updateDecorations (line 122) | function updateDecorations(editor: vscode.TextEditor) {
FILE: src/tableFormatter.ts
type ITableRange (line 14) | interface ITableRange {
function activate (line 40) | function activate(context: vscode.ExtensionContext) {
type ColumnAlignment (line 52) | enum ColumnAlignment {
class MarkdownDocumentFormatter (line 59) | class MarkdownDocumentFormatter implements vscode.DocumentFormattingEdit...
method provideDocumentFormattingEdits (line 60) | provideDocumentFormattingEdits(document: vscode.TextDocument, options:...
method detectTables (line 73) | protected detectTables(document: vscode.TextDocument): ITableRange[] |...
method getTableIndentation (line 111) | private getTableIndentation(text: string, options: vscode.FormattingOp...
method formatTable (line 121) | protected formatTable(target: ITableRange, doc: vscode.TextDocument, o...
method alignText (line 233) | private alignText(text: string, align: ColumnAlignment, length: number) {
class MarkdownDocumentRangeFormattingEditProvider (line 244) | class MarkdownDocumentRangeFormattingEditProvider extends MarkdownDocume...
method provideDocumentRangeFormattingEdits (line 245) | provideDocumentRangeFormattingEdits(document: vscode.TextDocument, ran...
FILE: src/test/runTest.ts
function main (line 5) | async function main() {
FILE: src/test/suite/index.ts
function run (line 7) | async function run(): Promise<void> {
FILE: src/test/suite/unit/linksRecognition.test.ts
function genIsLinkFunc (line 172) | function genIsLinkFunc(isLinkExpected: boolean) {
FILE: src/test/suite/unit/slugify.test.ts
type ICase (line 5) | type ICase = readonly [string, string];
FILE: src/test/suite/util/configuration.ts
type IConfigurationRecord (line 6) | type IConfigurationRecord<T = unknown> = readonly [string, T];
function resetConfiguration (line 26) | function resetConfiguration(configurationTarget: vscode.ConfigurationTar...
function updateConfiguration (line 36) | async function updateConfiguration({
FILE: src/test/suite/util/generic.ts
function sleep (line 30) | function sleep(ms: number): Promise<void> {
function testCommand (line 37) | async function testCommand(
FILE: src/theming/constant.ts
type Color (line 6) | const enum Color {
type FontIcon (line 20) | const enum FontIcon {
type DecorationClass (line 46) | const enum DecorationClass {
FILE: src/theming/decorationManager.ts
type IDecorationRecord (line 13) | interface IDecorationRecord {
type IFuncAnalysisWorker (line 29) | interface IFuncAnalysisWorker {
type IWorkerRegistry (line 34) | type IWorkerRegistry = { readonly [target in DecorationClass]: IFuncAnal...
type TaskState (line 39) | const enum TaskState {
type IDecorationAnalysisTask (line 50) | interface IDecorationAnalysisTask {
class DecorationAnalysisTask (line 83) | class DecorationAnalysisTask implements IDecorationAnalysisTask {
method result (line 93) | public get result(): readonly IDecorationRecord[] | undefined {
method state (line 97) | public get state(): TaskState {
method constructor (line 107) | constructor(document: vscode.TextDocument, workers: IWorkerRegistry, t...
method cancel (line 135) | public cancel(): void {
type IDecorationManager (line 141) | interface IDecorationManager extends IDisposable { }
class DecorationManager (line 160) | class DecorationManager implements IDecorationManager {
method constructor (line 194) | constructor(workers: IWorkerRegistry) {
method dispose (line 225) | public dispose(): void {
method applyDecoration (line 265) | private applyDecoration(editor: vscode.TextEditor): void {
method collectGarbage (line 338) | private collectGarbage(document: vscode.TextDocument): void {
method updateCache (line 349) | private updateCache(document: vscode.TextDocument): void {
FILE: src/toc.ts
type IHeadingBase (line 15) | interface IHeadingBase {
type IHeading (line 41) | interface IHeading extends IHeadingBase {
function activate (line 62) | function activate(context: ExtensionContext) {
function createToc (line 75) | async function createToc() {
function updateToc (line 91) | async function updateToc() {
function addSectionNumbers (line 124) | function addSectionNumbers() {
function removeSectionNumbers (line 163) | function removeSectionNumbers() {
function onWillSave (line 183) | function onWillSave(e: TextDocumentWillSaveEvent): void {
function getProjectExcludedHeadings (line 199) | function getProjectExcludedHeadings(doc: TextDocument): readonly Readonl...
function generateTocText (line 254) | async function generateTocText(doc: TextDocument): Promise<string> {
function detectTocRanges (line 303) | async function detectTocRanges(doc: TextDocument): Promise<[Array<Range>...
function commonPrefixLength (line 392) | function commonPrefixLength(s1: string, s2: string): number {
function radioOfCommonPrefix (line 402) | function radioOfCommonPrefix(s1: string, s2: string): number {
function loadTocConfig (line 418) | function loadTocConfig(editor: TextEditor): void {
function createLinkText (line 462) | function createLinkText(raw: string, env: object): string {
function getAllRootHeading (line 498) | function getAllRootHeading(doc: TextDocument, respectMagicCommentOmit: b...
function getAllTocEntry (line 653) | function getAllTocEntry(doc: TextDocument, {
class TocCodeLensProvider (line 696) | class TocCodeLensProvider implements CodeLensProvider {
method provideCodeLenses (line 697) | public provideCodeLenses(document: TextDocument, _: CancellationToken):
FILE: src/util/contextCheck.ts
function isInFencedCodeBlock (line 8) | function isInFencedCodeBlock(doc: vscode.TextDocument, lineIndex: number...
function mathEnvCheck (line 23) | function mathEnvCheck(doc: vscode.TextDocument, pos: vscode.Position): "...
FILE: src/util/generic.ts
function isMdDocument (line 20) | function isMdDocument(doc: vscode.TextDocument | undefined): boolean {
FILE: src/util/lazy.ts
type ILazy (line 1) | interface ILazy<T> {
class Lazy (line 9) | class Lazy<T> implements ILazy<T> {
method isValueCreated (line 16) | public get isValueCreated(): boolean {
method value (line 20) | public get value(): T {
method constructor (line 29) | constructor(factory: () => T) {
FILE: src/util/slugify.ts
function importZolaSlug (line 15) | async function importZolaSlug() {
function mdInlineToPlainText (line 43) | function mdInlineToPlainText(text: string, env: object): string {
function slugify (line 179) | function slugify(heading: string, {
FILE: src/zola-slug/src/lib.rs
function test_slugify (line 13) | fn test_slugify() {
FILE: tools/set-welcome-message.js
function setWelcomeMessage (line 28) | function setWelcomeMessage(message, locale = "en") {
Condensed preview — 88 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (497K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/Bug.md",
"chars": 497,
"preview": "---\nname: '🐛 Bug report'\nabout: 'Report errors or unexpected behavior.'\n---\n\n<!--\n⚠ Before proceeding:\n\nCheck FAQ (comma"
},
{
"path": ".github/ISSUE_TEMPLATE/Feature.md",
"chars": 339,
"preview": "---\nname: '✨ Feature request'\nabout: 'Suggest a new feature or improvement.'\n---\n\n<!--\n⚠ Before proceeding:\n\nCheck FAQ ("
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 151,
"preview": "blank_issues_enabled: false\n\ncontact_links:\n - name: '🔒 Security issue'\n url: 'https://github.com/yzhang-gh'\n abo"
},
{
"path": ".github/workflows/main.yml",
"chars": 1967,
"preview": "name: CI\n\n# Build VSIX packages in production and debug mode.\n# Run tests against debug build.\n#\n# This workflow is desi"
},
{
"path": ".github/workflows/test.yml",
"chars": 1635,
"preview": "name: Test\n\n# Run tests only.\n#\n# This workflow is designed to be run on PR to validate commits.\n# It can be seen as a s"
},
{
"path": ".gitignore",
"chars": 112,
"preview": "out\nnode_modules\n*.vsix\nROADMAP.md\n*.log\n/.vscode-test\ndist\ntmp\n\n# The welcome materials\n/welcome/**\n/changes.md"
},
{
"path": ".vscode/launch.json",
"chars": 1322,
"preview": "// A launch configuration that compiles the extension and then opens it inside a new window\n// Use IntelliSense to learn"
},
{
"path": ".vscode/settings.json",
"chars": 444,
"preview": "// Place your settings in this file to overwrite default and user settings.\n{\n \"files.exclude\": {\n \"out\": fals"
},
{
"path": ".vscode/tasks.json",
"chars": 730,
"preview": "// See https://go.microsoft.com/fwlink/?LinkId=733558\n// for the documentation about the tasks.json format\n// \"$tsc-watc"
},
{
"path": ".vscodeignore",
"chars": 697,
"preview": "# Important: The patterns are relative to the location of the vscodeignore file.\n# To help understand and edit, patterns"
},
{
"path": "CHANGELOG.md",
"chars": 47166,
"preview": "## 3.6.3 (2025.03.09)\n\n### New\n\n- [TOC] Add a new slugify method for Zola ([#1419](https://github.com/yzhang-gh/vscode-m"
},
{
"path": "LICENSE",
"chars": 1059,
"preview": "MIT License\n\nCopyright (c) 2017 张宇\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this"
},
{
"path": "README.md",
"chars": 21288,
"preview": "# Markdown Support for Visual Studio Code <!-- omit in toc -->\n\n[;\n\nconst logger = createLogger(\"Build\");\n\nlogger.log(\"Star"
},
{
"path": "build/compilation.js",
"chars": 3506,
"preview": "// # Notes\n//\n// We adjust the configurations according to OS environment variables.\n// The `mode` reflects the \"NODE_EN"
},
{
"path": "build/duplicate-changelog.js",
"chars": 767,
"preview": "// # Notes\n//\n// vsce will modify `README.md` and `CHANGELOG.md` during packaging.\n// Thus, we create the `changes.md` f"
},
{
"path": "build/logger.js",
"chars": 2058,
"preview": "\"use strict\";\n\nclass Logger {\n /**\n * The logger name. Read-only.\n * @type {string}\n */\n #name;\n\n /"
},
{
"path": "build/tsconfig.json",
"chars": 233,
"preview": "{\n \"extends\": \"../tsconfig.base.json\",\n \"compilerOptions\": {\n \"module\": \"CommonJS\",\n \"target\": \"ES20"
},
{
"path": "donate.md",
"chars": 266,
"preview": "# Buy Me a Coffee ☕\n\nThank you!\n\n| Alipay | WeChat Pay |\n| :------"
},
{
"path": "media/checkbox.css",
"chars": 154,
"preview": ".task-list-item {\n list-style-type: none;\n}\n\n.task-list-item-checkbox {\n margin-left: -20px;\n vertical-align: m"
},
{
"path": "package.json",
"chars": 32680,
"preview": "{\n \"name\": \"markdown-all-in-one\",\n \"displayName\": \"%ext.displayName%\",\n \"description\": \"%ext.description%\",\n "
},
{
"path": "package.nls.ja.json",
"chars": 5110,
"preview": "{\n \"ext.displayName\": \"Markdown All in One\",\n \"ext.description\": \"する事はMarkdownを書くだけでいいのです(キーボードショートカット、目次、自動プレビューな"
},
{
"path": "package.nls.json",
"chars": 7116,
"preview": "{\n \"ext.displayName\": \"Markdown All in One\",\n \"ext.description\": \"All you need to write Markdown (keyboard shortcu"
},
{
"path": "package.nls.ru-ru.json",
"chars": 7093,
"preview": "{\r\n \"ext.displayName\": \"Markdown Все в Одном\",\r\n \"ext.description\": \"Все что вам нужно для редактирования документ"
},
{
"path": "package.nls.zh-cn.json",
"chars": 5045,
"preview": "{\n \"ext.displayName\": \"Markdown All in One\",\n \"ext.description\": \"使用 Markdown 所需要的一切(快捷键,目录,自动预览以及更多功能)\",\n \"com"
},
{
"path": "package.nls.zh-tw.json",
"chars": 5334,
"preview": "{\r\n \"ext.displayName\": \"Markdown All in One\",\r\n \"ext.description\": \"使用 Markdown 所需的一切(快捷鍵、目錄、自動預覽以及更多功能)\",\r\n \"c"
},
{
"path": "src/IDisposable.ts",
"chars": 479,
"preview": "\"use strict\";\n\n/**\n * @see <https://code.visualstudio.com/api/references/vscode-api#Disposable>\n * @see <https://github."
},
{
"path": "src/completion.ts",
"chars": 17884,
"preview": "'use strict'\n\nimport * as fs from 'fs';\nimport sizeOf from 'image-size';\nimport * as path from 'path';\nimport { Cancella"
},
{
"path": "src/configuration/fallback.ts",
"chars": 1263,
"preview": "import * as vscode from \"vscode\";\nimport { IConfigurationFallbackMap } from \"./manager\";\nimport { IConfigurationKeyTypeM"
},
{
"path": "src/configuration/manager.ts",
"chars": 3078,
"preview": "import * as vscode from \"vscode\";\nimport type IDisposable from \"../IDisposable\";\nimport { Deprecated_Keys, Fallback_Map "
},
{
"path": "src/configuration/model.ts",
"chars": 2410,
"preview": "import type { MarkdownBulletListMarker, MarkdownEmphasisIndicator, MarkdownStrongEmphasisIndicator } from \"../contract/M"
},
{
"path": "src/contract/LanguageIdentifier.ts",
"chars": 278,
"preview": "\"use strict\";\n\n/**\n * Well-known language identifiers.\n * @see <https://code.visualstudio.com/docs/languages/identifiers"
},
{
"path": "src/contract/MarkdownSpec.ts",
"chars": 841,
"preview": "\"use strict\";\n\n// The name of types here begins with `Markdown`.\n\n/**\n * CommonMark bullet list marker.\n * https://spec."
},
{
"path": "src/contract/README.md",
"chars": 1549,
"preview": "# Top-level contracts and constants\n\n## Conventions\n\n### General\n\nVery few things are allowed to be under this directory"
},
{
"path": "src/contract/SlugifyMode.ts",
"chars": 436,
"preview": "/**\n * Slugify mode.\n */\nexport const enum SlugifyMode {\n /** Azure DevOps */\n AzureDevOps = \"azureDevops\",\n\n /"
},
{
"path": "src/contract/VisualStudioCodeLocaleId.ts",
"chars": 610,
"preview": "\"use strict\";\n\n/**\n * Visual Studio Code Locale ID.\n * @see <https://code.visualstudio.com/docs/getstarted/locales#_avai"
},
{
"path": "src/editor-context-service/context-service-in-fenced-code-block.ts",
"chars": 1131,
"preview": "'use strict'\r\n\r\nimport { ExtensionContext, Position, TextDocument, window } from 'vscode';\r\nimport { AbsContextService }"
},
{
"path": "src/editor-context-service/context-service-in-list.ts",
"chars": 1151,
"preview": "'use strict'\r\n\r\nimport { ExtensionContext, Position, TextDocument, window } from 'vscode';\r\nimport { AbsContextService }"
},
{
"path": "src/editor-context-service/context-service-in-math-env.ts",
"chars": 1095,
"preview": "'use strict'\r\n\r\nimport { ExtensionContext, Position, TextDocument, window } from 'vscode';\r\nimport { AbsContextService }"
},
{
"path": "src/editor-context-service/i-context-service.ts",
"chars": 1725,
"preview": "'use strict'\r\n\r\nimport { commands, ExtensionContext, Position, TextDocument } from 'vscode';\r\nimport type IDisposable fr"
},
{
"path": "src/editor-context-service/manager.ts",
"chars": 2468,
"preview": "'use strict'\r\n\r\nimport type IDisposable from \"../IDisposable\";\r\nimport { ExtensionContext, window } from 'vscode';\r\nimp"
},
{
"path": "src/extension.ts",
"chars": 4770,
"preview": "'use strict';\n\nimport { ExtensionContext, languages, Uri, window, workspace } from 'vscode';\nimport { configManager } fr"
},
{
"path": "src/formatting.ts",
"chars": 22615,
"preview": "'use strict';\n\nimport { commands, env, ExtensionContext, Position, Range, Selection, SnippetString, TextDocument, TextEd"
},
{
"path": "src/listEditing.ts",
"chars": 23978,
"preview": "import { commands, ExtensionContext, Position, Range, Selection, TextEditor, window, workspace, WorkspaceEdit } from 'vs"
},
{
"path": "src/markdown-it-plugin-provider.ts",
"chars": 1146,
"preview": "import type { KatexOptions } from \"katex\";\nimport MarkdownIt = require(\"markdown-it\");\nimport { configManager } from \"./"
},
{
"path": "src/markdownEngine.ts",
"chars": 10067,
"preview": "//// <https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/src/markdownEngine.ts>\n\nimpo"
},
{
"path": "src/markdownExtensions.ts",
"chars": 7575,
"preview": "// Reference to https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/src/markdownExtens"
},
{
"path": "src/nls/README.md",
"chars": 131,
"preview": "# National Language Support (NLS)\n\nThis module follows a pattern similar to [vscode-nls](https://github.com/microsoft/vs"
},
{
"path": "src/nls/index.ts",
"chars": 4973,
"preview": "\"use strict\";\n\nimport * as fs from \"fs\";\nimport * as vscode from \"vscode\";\nimport VisualStudioCodeLocaleId from \"../cont"
},
{
"path": "src/nls/resolveResource.ts",
"chars": 3462,
"preview": "\"use strict\";\n\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport type VisualStudioCodeLocaleId from \"../con"
},
{
"path": "src/preview.ts",
"chars": 3572,
"preview": "import * as vscode from \"vscode\";\n\n// These are dedicated objects for the auto preview.\nlet debounceHandle: ReturnType<t"
},
{
"path": "src/print.ts",
"chars": 13488,
"preview": "'use strict';\n\nimport * as fs from \"fs\";\nimport * as path from 'path';\nimport { commands, ExtensionContext, TextDocument"
},
{
"path": "src/syntaxDecorations.ts",
"chars": 6935,
"preview": "// This module is deprecated.\n// No update will land here.\n// It is superseded by `src/theming`, etc.\n\n\"use strict\";\n\nim"
},
{
"path": "src/tableFormatter.ts",
"chars": 11355,
"preview": "'use strict';\n\n// https://github.github.com/gfm/#tables-extension-\n\nimport * as vscode from \"vscode\";\nimport { configMan"
},
{
"path": "src/test/runTest.ts",
"chars": 647,
"preview": "import * as path from 'path';\n\nimport { runTests } from '@vscode/test-electron';\n\nasync function main() {\n\ttry {\n\t\t// Th"
},
{
"path": "src/test/suite/index.ts",
"chars": 1331,
"preview": "import * as path from 'path';\nimport * as Mocha from 'mocha';\nimport * as glob from 'glob';\nimport { resetConfiguration "
},
{
"path": "src/test/suite/integration/blockquoteEditing.test.ts",
"chars": 1759,
"preview": "import { Selection } from 'vscode';\nimport { resetConfiguration } from \"../util/configuration\";\nimport { testCommand } f"
},
{
"path": "src/test/suite/integration/formatting.test.ts",
"chars": 5107,
"preview": "import { Selection, env } from \"vscode\";\nimport { resetConfiguration, updateConfiguration } from \"../util/configuration\""
},
{
"path": "src/test/suite/integration/listEditing.fallback.test.ts",
"chars": 1570,
"preview": "import { Selection } from \"vscode\";\nimport { resetConfiguration } from \"../util/configuration\";\nimport { testCommand } f"
},
{
"path": "src/test/suite/integration/listEditing.test.ts",
"chars": 8196,
"preview": "import { Selection } from \"vscode\";\nimport { resetConfiguration } from \"../util/configuration\";\nimport { testCommand } f"
},
{
"path": "src/test/suite/integration/listRenumbering.test.ts",
"chars": 13732,
"preview": "import { Selection } from \"vscode\";\nimport { resetConfiguration } from \"../util/configuration\";\nimport { testCommand } f"
},
{
"path": "src/test/suite/integration/tableFormatter.test.ts",
"chars": 10707,
"preview": "import { Selection } from \"vscode\";\nimport { resetConfiguration, updateConfiguration } from \"../util/configuration\";\nimp"
},
{
"path": "src/test/suite/integration/toc.test.ts",
"chars": 23653,
"preview": "import { Selection } from \"vscode\";\nimport { resetConfiguration, updateConfiguration } from \"../util/configuration\";\nimp"
},
{
"path": "src/test/suite/unit/linksRecognition.test.ts",
"chars": 7635,
"preview": "import * as assert from 'assert';\nimport * as formatting from '../../../formatting';\n\n\nsuite(\"LinkRecognition.\", () => {"
},
{
"path": "src/test/suite/unit/slugify.test.ts",
"chars": 5008,
"preview": "import * as assert from 'assert';\nimport SlugifyMode from \"../../../contract/SlugifyMode\";\nimport { importZolaSlug, slug"
},
{
"path": "src/test/suite/util/configuration.ts",
"chars": 1853,
"preview": "import * as vscode from \"vscode\";\n\n/**\n * `[id, value]`\n */\nexport type IConfigurationRecord<T = unknown> = readonly [st"
},
{
"path": "src/test/suite/util/generic.ts",
"chars": 2079,
"preview": "import { strict as assert } from \"assert\";\nimport * as path from \"path\";\nimport * as vscode from \"vscode\";\n\n//#region Co"
},
{
"path": "src/theming/constant.ts",
"chars": 3500,
"preview": "import * as vscode from \"vscode\";\nimport type { IConfigurationKnownKey } from \"../configuration/model\";\n\n// Keys are sor"
},
{
"path": "src/theming/decorationManager.ts",
"chars": 13033,
"preview": "\"use strict\";\n\nimport * as vscode from \"vscode\";\nimport { configManager } from \"../configuration/manager\";\nimport type I"
},
{
"path": "src/theming/decorationWorkerRegistry.ts",
"chars": 9352,
"preview": "\"use strict\";\n\nimport * as vscode from \"vscode\";\nimport { commonMarkEngine, mdEngine } from \"../markdownEngine\";\nimport "
},
{
"path": "src/toc.ts",
"chars": 27018,
"preview": "'use strict';\n\nimport * as path from 'path';\nimport * as stringSimilarity from 'string-similarity';\nimport { Cancellatio"
},
{
"path": "src/util/contextCheck.ts",
"chars": 1526,
"preview": "import * as vscode from \"vscode\";\nimport { commonMarkEngine } from \"../markdownEngine\";\n\n/**\n * Checks whether the line "
},
{
"path": "src/util/generic.ts",
"chars": 1220,
"preview": "import * as vscode from \"vscode\";\nimport LanguageIdentifier from \"../contract/LanguageIdentifier\";\n\n/** Scheme `File` or"
},
{
"path": "src/util/katex-funcs.ts",
"chars": 12735,
"preview": "//\n// Suffixes explained:\n// \\cmd -> 0\n// \\cmd{$1} -> 1\n// \\cmd{$1}{$2} -> 2\n//\n// Use linebreak to mimic th"
},
{
"path": "src/util/lazy.ts",
"chars": 718,
"preview": "export interface ILazy<T> {\n readonly isValueCreated: boolean;\n readonly value: T;\n}\n\n/**\n * @see {@link https://d"
},
{
"path": "src/util/slugify.ts",
"chars": 8674,
"preview": "import SlugifyMode from \"../contract/SlugifyMode\";\nimport { configManager } from \"../configuration/manager\";\nimport { co"
},
{
"path": "src/zola-slug/.gitignore",
"chars": 47,
"preview": "debug/\ntarget/\nCargo.lock\n**/*.rs.bk\n*.pdb\npkg/"
},
{
"path": "src/zola-slug/Cargo.toml",
"chars": 857,
"preview": "[package]\nname = \"zola-slug\"\nversion = \"0.1.0\"\nedition = \"2021\"\nauthors = [\"hill <hill@hilll.dev>\"]\ndescription = \"expos"
},
{
"path": "src/zola-slug/LICENSE",
"chars": 1060,
"preview": "MIT License\n\nCopyright (c) 2024 hill\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof th"
},
{
"path": "src/zola-slug/src/lib.rs",
"chars": 770,
"preview": "#[allow(unused_imports)]\nuse slug::slugify;\n\n#[cfg(feature = \"mini-alloc\")]\n#[global_allocator]\nstatic ALLOC: mini_alloc"
},
{
"path": "syntaxes/katex.tmLanguage.json",
"chars": 2433,
"preview": "{\n \"fileTypes\": [],\n \"patterns\": [\n {\n \"include\": \"#environment\"\n },\n {\n "
},
{
"path": "syntaxes/math_display.markdown.tmLanguage.json",
"chars": 741,
"preview": "{\n\t\"fileTypes\": [],\n\t\"injectionSelector\": \"L:(text.html.markdown - meta - comment.block - markup.raw)\",\n\t\"patterns\": [\n\t"
},
{
"path": "syntaxes/math_inline.markdown.tmLanguage.json",
"chars": 1508,
"preview": "{\n\t\"fileTypes\": [],\n\t\"injectionSelector\": \"meta.paragraph.markdown - markup.inserted - meta.embedded\",\n\t\"patterns\": [\n\t\t"
},
{
"path": "test/test.md",
"chars": 0,
"preview": ""
},
{
"path": "tools/set-welcome-message.js",
"chars": 2184,
"preview": "/*!\n * Licensed under the MIT License.\n */\n\n// This helps you create a welcome message file.\n// It can be either importe"
},
{
"path": "tsconfig.base.json",
"chars": 744,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/tsconfig\",\n \"$comment\": \"Here are only compilerOptions shared across t"
},
{
"path": "tsconfig.json",
"chars": 298,
"preview": "{\n \"extends\": \"./tsconfig.base.json\",\n \"compilerOptions\": {\n \"module\": \"CommonJS\",\n \"target\": \"ES202"
},
{
"path": "webpack.config.js",
"chars": 3241,
"preview": "// @ts-check\n\n// # Notes\n//\n// ## Target and environment\n//\n// Specify the `target` option precisely to help webpack 5 t"
}
]
About this extraction
This page contains the full source code of the yzhang-gh/vscode-markdown GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 88 files (461.5 KB), approximately 119.2k tokens, and a symbol index with 251 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.