Code Monkey home page Code Monkey logo

coderay_bash's People

Contributors

avezina-ubik avatar codez avatar gliptak avatar pejuko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

coderay_bash's Issues

Does not work from command line

Maybe I am doing something wrong, but this is not working for me

$ gem list

*** LOCAL GEMS ***

coderay (1.0.5)
coderay_bash (1.0)

$ coderay -bash coderay.md
CodeRay::Scanners could not load plugin :bash; falling back to :text

Use instance variables for state and quote

When using instance instead of local variables for state and quote, it would be possible to re-use this scanner inside others (e.g. RHTML/ERB scanner with bash instead of html templates). If ERB is used within Bash quoted strings, the bash scanner continues in state :initial now after the ERB snippet instead of :quote.

Failed on bash script

Version:

coderay_bash-1.0.3

Bash:

cat $1 | while read json; do if [[ ${array2[0]} == 1 ]]; then
echo $json | ......

Error:

ActionView::Template::Error (

***ERROR in scanner.rb:200:in `rescue in tokenize': undefined method `index' for nil:NilClass (after 0 tokens)

tokens:


current line: 37  column: 48  pos: 612
matched: "${array2[0]}"  state: "Error in CodeRay::Scanners::Bash#scan_tokens, initial state was: :initial"
bol? = false,  eos? = false

surrounding code:
"ad json; do if [[ ${array2[0]}"  ~~  " == 1 ]]; then\necho $json | aw"

Following file output is not correct. Thanks.

#!/bin/sh

sudo qemu-kvm -m 768 \
    -boot d \
    -drive file=/bak/kvm/salix.qcow,cache=writeback \
    -cdrom /ntfs-d/ISO/salix64-openbox-14.1.iso -vnc :3

output with coderay, I got:

#!/bin/sh

sudo qemu-kvm -m 768 \
    -boot d \
    -drive file=writeback \
    -cdrom /ntfs-d/ISO/salix64-openbox-14.1.iso -vnc :3

I don't know why /bak/kvm/salix.qcow,cache= entire is stripped.

Thanks.

Failed on bash script

Bash:

function pscr() {
[ "${allargs/-v/}" != "$allargs" ] && echo "$@" && return 0 || return 1
}

Error:

***ERROR in scanner.rb:200:in tokenize': undefined methodfirst' for nil:NilCl
ass (after 0 tokens)

tokens:

current line: 2 column: 16 pos: 27
matched: ")" state: "Error in CodeRay::Scanners::Bash#scan_tokens, initial stat
e was: :initial"
bol? = false, eos? = false

surrounding code:
"fi\n" ~~ " {\n [ "${allargs/-v/}" != "$a"

does not install with version 1.0 of coderay

I get the following error when running bundle install:

Bundler could not find compatible versions for gem "coderay":
In Gemfile:
coderay_bash depends on
coderay (< 1.0)

coderay (1.0.0)

Coderay v1.0 is installed already.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.