Skip to content

Commit

Permalink
support apacite-style citations, fix #30
Browse files Browse the repository at this point in the history
  • Loading branch information
yymao committed Aug 25, 2022
1 parent a95ea85 commit c7b5151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adstex.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
except ImportError:
from urllib import unquote

__version__ = "0.3.10"
__version__ = "0.3.11"

_this_year = date.today().year % 100
_this_cent = date.today().year // 100

_re_comment = re.compile(r"(?<!\\)%.*(?=[\r\n])")
_re_bib = re.compile(r"\\(?:no)?bibliography\*?(?:(?!\n{2,})\s)*{((?:(?!\n{2,})[^{}])+)}")
_re_cite = re.compile(
r"\\(?:bibentry|[cC]ite[a-z]{0,7})\*?(?:(?!\n{2,})\s)*(?:(?<!\\)\[(?:(?!\n{2,}).)*?(?<!\\)\](?:(?!\n{2,})\s)*)*{((?:(?!\n{2,})[^{}])+)}",
r"\\(?:bibentry|[cC]ite[a-zA]{0,7})\*?(?:(?!\n{2,})\s)*(?:(?<!\\)[[<](?:(?!\n{2,}).)*?(?<!\\)[]>](?:(?!\n{2,})\s)*)*{((?:(?!\n{2,})[^{}])+)}",
re.S,
)
_re_fayear = re.compile(r"([A-Za-z-]+)(?:(?=[\W_])[^\s\d,]+)?((?:\d{2})?\d{2})")
Expand Down

0 comments on commit c7b5151

Please sign in to comment.