summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpandoc-emphasis13
1 files changed, 6 insertions, 7 deletions
diff --git a/pandoc-emphasis b/pandoc-emphasis
index 2d61514..97ddac0 100755
--- a/pandoc-emphasis
+++ b/pandoc-emphasis
@@ -85,23 +85,22 @@ sub emphasis {
if ( $self->name eq 'Emph' ) {
$window->set_view($self);
given ( stringify($self) ) {
- when (/^[^\"]+$/) {
+ when ( $self->content->[0]->name eq 'Str' ) {
if ( $window->peek_at_ledge() eq '"' ) {
$window->clear_ledge();
$title++;
-# FIXME: LaTeX-encode text
log_debug { 'emphasis →title: ' . $_ };
return $window->interpret_view(
- RawInline( 'latex',
- '\\title{' . $_ . '}' ));
+ Quoted( DoubleQuote,
+ $self->content ));
}
}
- when (/^\"([^\"]+)\"$/) {
-# FIXME: LaTeX-encode text
+ when ( $self->content->[0]->name eq 'Quoted' ) {
log_debug { 'emphasis →foreign: ' . $_ };
+ # FIXME: LaTeX-encode text
return $window->interpret_view(
RawInline( 'latex',
- '\\foreign{' . $1 . '}' ));
+ '\\foreign{' . $_ . '}' ));
}
}
return $window->describe_view();