From: VonC Date: Sat, 30 Nov 2013 21:29:04 +0000 (+0100) Subject: Simpler default syntax for markdown attributes. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=f2097417daca80b2caaed2661ee646e861d789c8;p=reveal.js.git Simpler default syntax for markdown attributes. - on slides: .slide x=y - on elements: .element x=y Those are detected in html comment, in order to not be visible if a markdown is edited in an html editor. --- diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index 6e12627..19aea28 100755 --- a/plugin/markdown/markdown.js +++ b/plugin/markdown/markdown.js @@ -28,8 +28,8 @@ var DEFAULT_SLIDE_SEPARATOR = '^\n---\n$', DEFAULT_NOTES_SEPARATOR = 'note:', - DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '{\\\.\s*?([^}]+?)}', - DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = 'slide-attributes:\\\s(.*?)$'; + DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$', + DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$'; /**