Developer Corner

Generated markup

Syntax Highligther

1<pre class="php">
2   CODE GOES HERE
3</pre>

Prism

1<pre class="language-php">
2   <code>
3      CODE GOES HERE
4   </code>
5</pre>

FAQ

Howto install JS vendors

  1. Download amd install node.js from http://nodejs.org/download/

  2. Install bower

    npm install bower
    
  3. Install vendors from CLI

    node_modules/.bin/bower install
    
  4. Remove unneeded files in Resources/Public/Javascript/vendor:
    • qunit folder

    • xregexp folder

    • prism/gulpfile.js folder

    • all *.min.js files in prism/components/

    • all untracked files in prism/

Howto add BOM to all reStructuredText files

While editing the files in Eclipse, the BOM possibly gets removed, this script will help you to re-add the UTF8 BOM again.

Simply put that into the extension root directory, add executable rights (chmod u+x ...). If you are still experiencing issues, just comment out the last line and execute the script multiple times until no output is displayed. Then uncomment the last line.

#!/bin/bash
for F in $(ls -R Documentation/*.rst Documentation/*/*.rst Documentation/*.txt)
do
  if [[ -f $F && `head -c 3 $F` == $'\xef\xbb\xbf' ]]; then
      # file exists and has UTF-8 BOM
      mv $F $F.bak
      tail -c +4 $F.bak > $F
      rm -f $F.bak
      echo "removed BOM from $F"
  fi
done
for file in $(ls -R Documentation/*.rst Documentation/*/*.rst Documentation/*.txt); do sed -i '1s/^/\xef\xbb\xbf/' "$file"; done

Run unit tests

cd packages/beautyofcode

composer install

cd .Build

bash ./run_tests.sh