Make draft mode regex global

This commit is contained in:
James Allen 2016-02-02 15:28:59 +00:00
parent 97b5ac6a7f
commit 263ee43cb5

View file

@ -16,6 +16,6 @@ module.exports = DraftModeManager =
_injectDraftOption: (content) ->
content
# With existing options (must be first, otherwise both are applied)
.replace(/\\documentclass\[/, "\\documentclass[draft,")
.replace(/\\documentclass\[/g, "\\documentclass[draft,")
# Without existing options
.replace(/\\documentclass\{/, "\\documentclass[draft]{")
.replace(/\\documentclass\{/g, "\\documentclass[draft]{")