mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-11 11:57:16 +00:00
b24bba7a20
Org mode makes a distinction between smart parsing of quotes, and smart parsing of special strings like `...`. The finer grained control over these features is necessary to truthfully reproduce Emacs Org mode behavior. Special strings are enabled by default, while smart quotes are disabled. The behavior of `special_string` is brought closer to the reference implementation in that `\-` is now treated as a soft hyphen.
53 lines
1.3 KiB
Lua
53 lines
1.3 KiB
Lua
local tasty = require 'tasty'
|
|
|
|
local test = tasty.test_case
|
|
local group = tasty.test_group
|
|
local assert = tasty.assert
|
|
|
|
local format = require 'pandoc.format'
|
|
|
|
return {
|
|
group 'default_extensions' {
|
|
test('docx', function ()
|
|
local docx_default_exts = {
|
|
'auto_identifiers',
|
|
}
|
|
assert.are_same(format.default_extensions('docx'), docx_default_exts)
|
|
end),
|
|
},
|
|
|
|
group 'all_extensions' {
|
|
test('docx', function ()
|
|
local docx_default_exts = {
|
|
'ascii_identifiers',
|
|
'auto_identifiers',
|
|
'citations',
|
|
'east_asian_line_breaks',
|
|
'empty_paragraphs',
|
|
'gfm_auto_identifiers',
|
|
'native_numbering',
|
|
'styles',
|
|
}
|
|
assert.are_same(format.all_extensions('docx'), docx_default_exts)
|
|
end),
|
|
},
|
|
|
|
group 'extensions' {
|
|
test('org', function ()
|
|
local org_default_exts = {
|
|
ascii_identifiers = false,
|
|
auto_identifiers = true,
|
|
citations = true,
|
|
east_asian_line_breaks = false,
|
|
fancy_lists = false,
|
|
gfm_auto_identifiers = false,
|
|
smart = false,
|
|
smart_quotes = false,
|
|
special_strings = true,
|
|
task_lists = true,
|
|
}
|
|
assert.are_same(format.extensions 'org', org_default_exts)
|
|
end),
|
|
},
|
|
}
|