aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-25 19:18:45 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-25 19:18:45 +0000
commit50851fc4e29cecddda40d58d0db2135ee4b4c0be (patch)
tree2e6b7e6e7d1b3568acfe012b8f26d8754745b1f8 /lib
parent05b6cfe4e5177ee0b4c092d6c4289680a063568c (diff)
Parse bold document matcher
Diffstat (limited to 'lib')
-rw-r--r--lib/document-matchers.js1
-rw-r--r--lib/style-reader.js2
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/document-matchers.js b/lib/document-matchers.js
index a03e335..af322c8 100644
--- a/lib/document-matchers.js
+++ b/lib/document-matchers.js
@@ -1,5 +1,6 @@
exports.paragraph = paragraph;
exports.run = run;
+exports.bold = new Matcher("bold");
exports.underline = new Matcher("underline");
exports.strikethrough = new Matcher("strikethrough");
diff --git a/lib/style-reader.js b/lib/style-reader.js
index 6d36c42..d732181 100644
--- a/lib/style-reader.js
+++ b/lib/style-reader.js
@@ -121,11 +121,13 @@ function documentMatcherRule() {
return createMatcher(matcherOptions);
});
+ var bold = identifierToConstant("b", documentMatchers.bold);
var underline = identifierToConstant("u", documentMatchers.underline);
var strikethrough = identifierToConstant("strike", documentMatchers.strikethrough);
return lop.rules.firstOf("element type",
paragraphOrRun,
+ bold,
underline,
strikethrough
);