Skip to content
This repository was archived by the owner on Sep 23, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/deviceUtils.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ getDocumentPointsize <- function( docString ){
# startps component of the pDevDesc structure.

# Search the document declaration for the pointsize.
psLocation <- regexpr( '\\d+[pt]', docString, ignore.case = T, perl = T )
psLocation <- regexpr( '\\<\\d+pt\\>', docString, ignore.case = T, perl = T )

# If there were no matches, regexpr() returns -1 and this
# function returns NA.
Expand All @@ -27,7 +27,7 @@ getDocumentPointsize <- function( docString ){

# Extract and return the pointsize.
pointsize <- substr( docString, psLocation,
psLocation + attr( psLocation, 'match.length') - 2 )
psLocation + attr( psLocation, 'match.length') - 3 )

return( as.numeric( pointsize ) )

Expand Down