yyjhao / markmon Goto Github PK
View Code? Open in Web Editor NEWA pandoc/markdown previewer with fast Mathjax re-rendering.
A pandoc/markdown previewer with fast Mathjax re-rendering.
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
info - socket.io started
express: app.del: Use app.delete instead
Do footnotes have any css name/selector -I don't actually know what are they called, I jut realized- that I could poke at to change their styling from my custom css sheet? I didn't see any in the default css.
If not so, would it be much trouble to add one? Default blue looks pretty ugly on a dark background.
edit: Oh, golly. CSS has a:link as a native selector that does this.
I edited my project settings to include the following code:
"settings": {
"projectdir": "/path/to/readme-directory"
}
Without success.
How should I specify this setting on a per-project basis ?
hi
I'm up against an issue with npm install. Any ideas?
thanks:
MacBook-Pro-2:~ chipbrock$ sudo npm install -g markmon
/usr/local/bin/markmon -> /usr/local/lib/node_modules/markmon/bin/markmon
[email protected] install /usr/local/lib/node_modules/markmon/node_modules/fsevents
node-gyp rebuild
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:348:9: error: no type named 'ThrowException' in namespace 'v8'
v8::ThrowException(error);
~~~~^
../../nan/nan.h:355:65: error: no member named 'New' in 'v8::String'
v8::Localv8::Value err = v8::Exception::Error(v8::String::New(msg));
~~~~~~~~~~~~^
../../nan/nan.h:356:50: error: expected '(' for function-style cast or type construction
v8::Localv8::Object obj = err.Asv8::Object();
~~~~~~~~~~^
../../nan/nan.h:356:52: error: expected expression
v8::Localv8::Object obj = err.Asv8::Object();
^
../../nan/nan.h:357:65: error: too few arguments to function call, expected 2, have 1
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~~~ ^
/Users/chipbrock/.node-gyp/7.10.0/include/node/v8.h:2770:3: note: 'New' declared here
static Local New(Isolate* isolate, int32_t value);
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~^
../../nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:373:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:381:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:406:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:141:71: note: expanded from macro 'NAN_INLINE'
^~~~~~~~~~
../../nan/nan.h:416:12: error: no matching function for call to 'New'
return node::Buffer::New(data, size);
^~~~~~~~~~~~~~~~~
/Users/chipbrock/.node-gyp/7.10.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no known
conversion from 'char ' to 'v8::Isolate ' for 1st argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate, size_t length);
^
/Users/chipbrock/.node-gyp/7.10.0/include/node/node_buffer.h:34:40: note: candidate function not viable: no known
conversion from 'char ' to 'v8::Isolate ' for 1st argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate,
^
/Users/chipbrock/.node-gyp/7.10.0/include/node/node_buffer.h:46:40: note: candidate function not viable: requires 3
arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate,
^
/Users/chipbrock/.node-gyp/7.10.0/include/node/node_buffer.h:39:40: note: candidate function not viable: requires 5
arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:420:12: error: no matching function for call to 'New'
return node::Buffer::New(size);
^~~~~~~~~~~~~~~~~
/Users/chipbrock/.node-gyp/7.10.0/include/node/node_buffer.h:31:40: note: candidate function not viable: requires 2
arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, size_t length);
^
/Users/chipbrock/.node-gyp/7.10.0/include/node/node_buffer.h:34:40: note: candidate function not viable: requires at least
2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/chipbrock/.node-gyp/7.10.0/include/node/node_buffer.h:46:40: note: candidate function not viable: requires 3
arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/chipbrock/.node-gyp/7.10.0/include/node/node_buffer.h:39:40: note: candidate function not viable: requires 5
arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:427:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(data, size);
~~~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.4.0
gyp ERR! command "/usr/local/Cellar/node/7.10.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/markmon/node_modules/fsevents
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
/usr/local/lib
└── [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/markmon/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
Hello,
I cannot run markmon on Arch Linux using the latest node. After installing with npm
, I get the following error when running markmon:
$ markmon express deprecated app.configure: Check app.get('env') in an if statement ../../usr/lib/node_modules/markmon/lib/Server.js:32:9
connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead ../../usr/lib/node_modules/markmon/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read ../../usr/lib/node_modules/markmon/node_modules/connect/lib/middleware/multipart.js:86:15
/usr/lib/node_modules/markmon/node_modules/socket.io/lib/store.js:35
Store.prototype.__proto__ = EventEmitter.prototype;
^
TypeError: Cannot read property 'prototype' of undefined
at Object.<anonymous> (/usr/lib/node_modules/markmon/node_modules/socket.io/lib/store.js:35:41)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/markmon/node_modules/socket.io/lib/manager.js:16:13)
at Module._compile (module.js:571:32)
node --version -> v7.2.1
npm --version -> 4.0.3
exec error: [Error: stdout maxBuffer exceeded.]
The file I try to open is here
I couldn't install without first installing Visual Studio 2010 (the SDK alone was not enough).
Steps to reproduce
Run npm install -g markmon
Observed behaviour
C:\Users\someuser>npm install -g markmon
npm WARN optional dep failed, continuing [email protected]
\
> [email protected] install C:\Users\someuser\AppData\Roaming\npm\node_modules\markmon\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\someuser\AppData\Roaming\npm\node_modules\markmon\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". [C:\Users\someuser\AppData\Roaming\npm\node_modules\markmon\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". [C:\Users\someuser\AppData\Roaming\npm\node_modules\markmon\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\validation.vcxproj]
C:\Users\someuser\AppData\Roaming\npm\markmon -> C:\Users\someuser\AppData\Roaming\npm\node_modules\markmon\bin\markmon
[email protected] C:\Users\someuser\AppData\Roaming\npm\node_modules\markmon
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
Workaround
Install Visual Studio 2010.
Port 3000 is in common use for many projects, including create-react-app
and when I install markmon globally it takes over that port.
I'm using relative path to images. However none is showing up with the default configuration. For intance:
# My awesome project
![dataviz preview](./preview.png)
blabla bla.
Would it be possible to somehow allow custom css styles (without having to change the original style files)? I was hoping that just doing
markmon file.md --command "pandoc -c path/to/css"
would work but it doesn't because the default style is apparently still applied after the pandoc conversion (I guess it maybe is a result of conversion being done on smaller fragments too). In any case, what would be required for something like this?
No live preview, if I install my own keyboard shortcut for markmon_toggle
command.
Preview changes in real time.
No preview in real time. After I run the command markmon_toggle
, the file is opened in the browser, but if I make changes in my file, the browser will not be seen.
I added in Preferences
→ Key Bindings - User
file these lines and save this file:
{
"keys": ["ctrl+k", "ь"],
"command": "markmon_toggle",
"args": {
"enable": true
}
},
I run command markmon_toggle
in any markdown file:
key evt: control+k
chr evt: ь (0x44c)
command: markmon_toggle {"enable": true}
My markdown file is opened in the browser, but if I make changes in my file, the browser will not be seen.
If I remove my changes at my Key Bindings - User
file, restart Sublime Text and run markmon_toggle
:
key evt: control+k
chr evt: m (0x6d)
command: markmon_toggle {"enable": true}
Markmon works is good.
Thanks.
Would you like to implement a feature that I start markmon in a directory and I can access all the markdown files via my browser with fast re-rendering when file changes?
It will be very helpful for me.
I have a fairly large Markdown file, and exactly when the number of characters is 120731 (and I save) I get this error:
exec error: { Error: stdout maxBuffer exceeded
at Socket.<anonymous> (child_process.js:259:14)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:548:20)
cmd: 'pandoc < "path_to_file\\file.md"' }
It works with 120730 characters and less.
It's not a pandoc issue as I can convert my file to html with no problems.
Hi!
Very nice app!
I'm trying to build an open source latex editor, and I stumbled upon your project. Is it possibile to run this package in a node (meteor) site?
I got the impression this package will automatically start his own node server, thus not being usable on an already running server. But I'm also very noob, so I could be totally wrong :P
Hallo,
editing an equation in a file that is being previewd does not seem to work properly:
I am new to pandoc, but I am using markmon for rendering markdown. I like to get the preview in HTML with this tool, but can I edit the parsing so I get a cleaner look. My code chucks offset with "`" don't highlight a different color and the font's look dated.
$ sudo netstat -an | grep 3002
tcp6 0 0 ::1.3002 ::1.53506 ESTABLISHED
tcp6 0 0 ::1.53506 ::1.3002 ESTABLISHED
tcp46 0 0 *.3002 *.* LISTEN
$ sudo lsof -i tcp:3002 -nn
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Google 10574 peter 249u IPv6 0xf11290323e1efd77 0t0 TCP [::1]:53506->[::1]:exlm-agent (ESTABLISHED)
node 49338 peter 11u IPv6 0xf112903217839577 0t0 TCP *:exlm-agent (LISTEN)
node 49338 peter 18u IPv6 0xf1129032193b1377 0t0 TCP [::1]:exlm-agent->[::1]:53506 (ESTABLISHED)
$ ps auwwx |grep markmon
peter 49338 0.0 0.2 3101248 26064 ?? S 20Sep16 0:12.12 node /usr/local/bin/markmon --port 3002 --command pandoc -t HTML5 --mathjax
(exlm-agent
is listed as port 3002 in /etc/services
)
markmon was started by https://packagecontrol.io/packages/Markmon%20real-time%20markdown%20preview
This means that, unless I firewall carefully, I am exposing my document to my local LAN, or with v6, perhaps the whole world.
If I understand that right Sublime-Text-Markmon will leave by default the --projectdir
option of makmon empty, except if projectdir
is statically set in sublime-text-markmon.sublime-settings
file. Is that right?
I'm interested to simply set projectdir
to the folder of the markdown file which is actually processed by makmon. Also I want to set the command
option to a script also depending on the path of the markdown file.
This should be possible if you get the folder of the markdown file in class MarkmonSettings:
in markmon.py
. I assume the folder is already saved in variable anywhere in the plugin, but actually I can't figured out where. Can you perhaps help me to get that working for my own?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.