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

adds process-anyway option #162

Merged
merged 1 commit into from
Feb 16, 2021
Merged

Conversation

jdutant
Copy link
Contributor

@jdutant jdutant commented Feb 12, 2021

Addresses #147. In standalone mode, setting a wordcount variable to process-anyway allows the pandoc process to continue in addition to counting words.

In standalone mode, setting a `wordcount` variable to `process-anyway` allows the pandoc process to continue in addition to counting words.
Copy link
Member

@tarleb tarleb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM! Holding off merging a little longer in case @jgm has comments (since he authored this filter).


-- check if the `wordcount` variable is set to `process-anyway`
function Meta(meta)
if meta.wordcount and (meta.wordcount=="process-anyway"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

function Meta(meta)
  local keyword_list = pandoc.List {'process-anyway', 'process', 'convert', 'keep-going'}
  process_anyway = keyword_list:includes(meta.wordcount)
end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with this

@tarleb tarleb merged commit 8ebbe09 into pandoc:master Feb 16, 2021
@jdutant jdutant deleted the wordcount-dontstop branch February 16, 2021 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants