Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc fixes #14

Merged
merged 14 commits into from Apr 17, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev
Fix compatibility with lpeg 1.0
Behaviour of lpeg.B has changed: it uses the length of the pattern to know how far to look back

Keep passing the 2nd parameter so that compat with lpeg 0.10 isn't lost
  • Loading branch information
daurnimator committed Apr 16, 2016
commit 51756bfca858795a423f4ced9e7c164a35f1638b
@@ -573,19 +573,19 @@ function M.new(writer, options)

local Dash = P("---") * -dash / writer.mdash
+ P("--") * -dash / writer.ndash
+ P("-") * #digit * B(digit, 2) / writer.ndash
+ P("-") * #digit * B(digit*1, 2) / writer.ndash

local DoubleQuoted = dquote * Ct((Inline - dquote)^1) * dquote
/ writer.doublequoted

local squote_start = squote * -spacing

local squote_end = squote * B(nonspacechar, 2)
local squote_end = squote * B(nonspacechar*1, 2)

local SingleQuoted = squote_start * Ct((Inline - squote_end)^1) * squote_end
/ writer.singlequoted

local Apostrophe = squote * B(nonspacechar, 2) / "’"
local Apostrophe = squote * B(nonspacechar*1, 2) / "’"

local Smart = Ellipsis + Dash + SingleQuoted + DoubleQuoted + Apostrophe