GithubHelp home page GithubHelp logo

copypastelatex's Introduction

copypasteLaTex

Code Javascript permettant de formater les codes provenant de Latex.

Enlève les nombres en début de ligne, supprime les espaces inutiles et remplace des guillemets pour que le code ainsi formatté soit direment utilisable.

Utiliser le script

Exemple:

Avant

1 incoming ( req , res , cb ) {
2 res . endStatus (200) ;
3 // Extract the body of the POST request
4 if ( req. body . object === ’page ’ && req . body . entry ) {
5 let data = req . body ;
6 // for on page objects
7 // for on messageObj s if messaging of each page
exists
8 if( messageObj . postback ) {
9 // handle postbacks
10 }
11 else {
12 // handle messages
13 }
14 }
15 }

Après

incoming(req , res , cb){
res.endStatus(200);
// Extract the body of the POST request
if(req.body.object ==='page'&& req.body.entry){
let data = req.body ;
// for on page objects
// for on messageObj s if messaging of each page
exists
if(messageObj.postback){
// handle postbacks
}
else {
// handle messages
}
}
}

Il ne reste plus qu'à indenter le code

incoming(req , res , cb){
  res.endStatus(200);
  // Extract the body of the POST request
  if(req.body.object ==='page'&& req.body.entry){
    let data = req.body ;
    // for on page objects
    // for on messageObj s if messaging of each page exists
    if(messageObj.postback){
      // handle postbacks
    }
    else {
      // handle messages
    }
  }
}

copypastelatex's People

Contributors

nandyba avatar

Watchers

James Cloos avatar  avatar

copypastelatex's Issues

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.