OmniMarkupPreviewer 預覽文件遭遇 404

墮落小生發表於2019-05-16

問題描述

在使用 OmniMarkupPreviewer 預覽文件的時候,出現如下提示:

Error: 404 Not Found

Sorry, the requested URL 'http://192.168.0.59:5100/view/41' caused an error:

'buffer_id(41) is not valid (closed or unsupported file format)'

**NOTE:** If you run multiple instances of Sublime Text, you may want to adjust
the `server_port` option in order to get this plugin work again.  

解決方法

Quick Fix 1: Remove Strikethrough Extension

Sublime Text > Preferences > Package Settings > OmniMarkupPreviewer > Settings - User paste the following to remove the strikeout package.

{
    "renderer_options-MarkdownRenderer": {
        "extensions": ["tables", "fenced_code", "codehilite"]
    }
}  

Quick Fix 2: Fix the Strikethrough Extension (if you need it)

Find the python-markdown sublime package.

On the Mac: subl "/Users//Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/mdx_strikeout.py"

Replace the makeExtension() method with the following:

def makeExtension(*args, **kwargs):
    return StrikeoutExtension(*args, **kwargs)

Save, quit and reload Sublime Text.

我使用方法1,成功解決問題

相關文章