Skip to content

Commit

Permalink
feat: better print inline (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Jul 25, 2018
1 parent 7fb5902 commit 648c1fb
Show file tree
Hide file tree
Showing 36 changed files with 1,409 additions and 345 deletions.
4 changes: 4 additions & 0 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
const engine = require("php-parser");

function parse(text) {
// By default php parser don't create `inline` node between `?>\n<?`, we recreate their
// Need add option to parser to avoid this behaviour
text = text.replace(/\?>\n<\?/g, "?>\n___PSEUDO_INLINE_PLACEHOLDER___<?");

// initialize a new parser instance
const parser = new engine({
// some options :
Expand Down
Loading

0 comments on commit 648c1fb

Please sign in to comment.