Skip to content

Instantly share code, notes, and snippets.

@ged1959
Last active March 11, 2018 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ged1959/d2967459d74bb93250b13c9674962b8c to your computer and use it in GitHub Desktop.
Save ged1959/d2967459d74bb93250b13c9674962b8c to your computer and use it in GitHub Desktop.
Visual Studio Codeのmarkdownに異変。

Visual Studio Codeが…。

Created: 18.03.11

突然、markdownのスタイルが効かなくなった。つまり以下のようなことはだめに。

原因は以下。

どうやら、セキュリティの関係らしい。何か起きたのだろうか? 以下。

Root cause: We now restrict the markdown preview to only loading resources inside the current workspace for security reasons. Workaround is to move the css file into your workspace or publish the css as a markdown extension extension

I'm hesitant to relax this again even though it is a regression because the old behavior could be abused by a malicious workspace

I'll update the docs to note this restriction

元に戻す気はないみたい。そこで、解決策。まずシンプルには以下。アプリケーションの本体は変えず(VS Codeには頼らず)、個々のファイルを変更するだけ。

それから、VS Codeの拡張機能を使う、という方法もある。以下。

ついでに、markdownに目次をつける拡張機能も便利そうなので追加。

TOCで検索すると、他にもいろいろあるみたい。当面は、これで十分に満足。さらに!、統合ターミナルはこれ。今まで、面倒なことやっていた…。

最後の方で、shellを色々と選択できる機能が紹介されていた。これ簡単。

それにしても、アプリケーションというものは、たまに最新の機能をチェックしないと、かえって不便な状態でブーブー文句言いながら使っている、ということになりかねないと痛感した次第。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment