Skip to content

Commit

Permalink
Merge pull request #21 from aureooms/feature-parse-newenvironment
Browse files Browse the repository at this point in the history
This pull request allows us to parse user-defined environments.
Fixes #17 and fixes #18.
  • Loading branch information
Aurélien Ooms committed Oct 16, 2018
2 parents 363f9a3 + 2f1cfd3 commit 4314ab7
Show file tree
Hide file tree
Showing 15 changed files with 1,305 additions and 380 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ Expands each user-defined macro and removes their definition.

> `\newcommand\swap[2]{#2#1}\swap{a}{b}` ~ `ba`
### `\newenvironment` user-defined environments

> `\newenvironment{items}{\begin{itemize}}{\end{itemize}}\begin{items}\end{items}` ~ `\begin{itemize}\end{itemize}`
### Altogether now!

> `\myfalse\ifmy\def\xyz{A cat.}\else\def\xyz{A dog.}\fi\xyz% $#@!` ~ `A dog.%`
Expand Down
25 changes: 24 additions & 1 deletion lib/grammar.js

Large diffs are not rendered by default.

Loading

0 comments on commit 4314ab7

Please sign in to comment.