View Source RenewEx

RenewEx

Renew file parser in Elixir.

Hex.pm Documentation


Test cases

Both parser and serializer are tested on more than 1000 example files.

Running tests

All test:

mix test

Only fast tests:

mix test --exclude slow

Example Usage

# Read rnw file
{:ok, file_content} = File.read("example.rnw")

# Parse file content
{:ok, %Renewex.Document{} = document} = Renewex.parse_document(file_content)

# Inspect document:
IO.puts(document.version)
IO.puts(document.root)
IO.puts(Enum.count(document.refs))

# Do some work with `document`
# ...

# serialize document back into string
{:ok, serialized} = Renewex.serialize_document(document)

# Write rnw file
File.write("modified.rnw", serialized)

www.laszlokorte.de