mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 15:49:55 +08:00
234694b50f
This adds the markdown.it engine to Discourse. https://github.com/markdown-it/markdown-it As the migration is going to take a while the new engine is default disabled. To enable it you must change the hidden site setting: enable_experimental_markdown_it. This commit is a squash of many other commits, it also includes some improvements to autospec (ability to run plugins), and a dev dependency on the og gem for html normalization.
37 lines
888 B
Bash
Executable File
37 lines
888 B
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../tmp && pwd )"
|
|
|
|
SOCKET="$DIR"/file_change.sock
|
|
|
|
if [[ -e "$SOCKET" ]]; then
|
|
echo "$1 $2" | socat - UNIX-CONNECT:$SOCKET >/dev/null 2>/dev/null
|
|
if [ $? != 0 ]; then
|
|
rm $SOCKET
|
|
fi
|
|
fi
|
|
|
|
# To enable:
|
|
#
|
|
# 1. Install socat
|
|
# 2. Add VIM_AUTOSPEC=1 to your environment
|
|
# 3. Add the following to your .vimrc
|
|
#
|
|
# function s:notify_file_change()
|
|
# let root = rails#app().path()
|
|
# let notify = root . "/bin/notify_file_change"
|
|
# if executable(notify)
|
|
# if executable('socat')
|
|
# execute "!" . notify . ' ' . expand("%:p") . " " . line(".")
|
|
# end
|
|
# end
|
|
# " redraw!
|
|
# endfunction
|
|
|
|
# autocmd BufWritePost * silent! call s:notify_file_change()
|
|
|
|
# What this does?
|
|
#
|
|
# bin/rake autospec will now automatically try running specs where the actual cursor is located first, then fall back to running spec file
|