Skip to content

Commit

Permalink
refactor(packages)!: Process bibtex content as XML not SIL
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The primary use was probably internal to SILE, but if
by chance you have bibtex databases with formatting commands in SIL
markup format rather than just plain text content the markup will cease
to function and will need to be converted to XML syntax instead.

This enables the use of declarative markup in Fluent localizations.
  • Loading branch information
alerque committed Aug 4, 2022
1 parent 350cf14 commit a259b32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/bibtex/bibliography.lua
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ Bibliography = {
italic = function (...)
local t = {...}
return function(item)
return Bibliography._process(item, t, "\\em{", "}")
return Bibliography._process(item, t, "<em>", "</em>")
end
end,
parens = function (...)
Expand Down
4 changes: 2 additions & 2 deletions packages/bibtex/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function package:registerCommands ()
SU.warn("Unknown reference in citation "..options.key)
return
end
SILE.processString(cite, "sil")
SILE.processString(("<sile>%s</sile>"):format(cite), "xml")
end)

self:registerCommand("reference", function (options, content)
Expand All @@ -112,7 +112,7 @@ function package:registerCommands ()
SU.warn("Unknown type @"..err.." in citation for reference "..options.key)
return
end
SILE.processString(cite, "sil")
SILE.processString(("<sile>%s</sile>"):format(cite), "xml")
end)

end
Expand Down

0 comments on commit a259b32

Please sign in to comment.