From 17577bdd715c65e71d81f762b54b8c27f60f4535 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 17 Jun 2015 14:33:43 +0100 Subject: Support underlines in style map --- lib/style-reader.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/style-reader.js') diff --git a/lib/style-reader.js b/lib/style-reader.js index ef379b6..811e06e 100644 --- a/lib/style-reader.js +++ b/lib/style-reader.js @@ -109,7 +109,7 @@ function documentMatcherRule() { ); var matcherSuffixes = lop.rules.zeroOrMore(matcherSuffix); - return sequence( + var paragraphOrRun = sequence( sequence.capture(elementTypeRule), sequence.capture(matcherSuffixes) ).map(function(createMatcher, suffixes) { @@ -119,6 +119,13 @@ function documentMatcherRule() { }); return createMatcher(matcherOptions); }); + + var underline = identifierToConstant("u", documentMatchers.underline); + + return lop.rules.firstOf("element type", + paragraphOrRun, + underline + ); } function readHtmlPath(string) { -- cgit v1.2.3