"근원적인 정의 또는 설명"을 의미하는 접두사. "~의 가운데서, ~와 함께, 뒤에, 바꾸다"등의 의미를 갖는 그리스어에서 파생.

Meta 페이지들


으... 이거 RegularExpression 아시는분! Meta로 시작하고 다음에 대문자가 등장하는 페이지리스트를 출력하고자 [[PageList(^Meta[A-Z].*)]] 를 썼는데 자꾸, MetabolicPathway가 출력됩니다. Meta다음에 소문자잖아요 그래서 저건 나오면 안되거든요? 어찌해야하는지 아시는분 답좀... --yong27

제 생각으론 NoSmokeMoinMoin/wikimacro.py 의 PageList함수에 문제가 있는 거 같아요.

    def _macro_PageList(self, args):
        try:
            needle_re = re.compile(args, re.IGNORECASE)
        except re.error, e:
            return "<b>%s: %s</b>" % (
                user.current.text("ERROR in regex '%s'") % (args,), e)

        all_pages = wikiutil.getPageList(config.text_dir)
        hits = filter(needle_re.search, all_pages)
        hits.sort()
    
        result = self.formatter.bullet_list(1)
        for filename in hits:
            result = result + self.formatter.listitem(1)
            result = result + self.formatter.pagelink(filename)
            result = result + self.formatter.listitem(0)
        result = result + self.formatter.bullet_list(0)
        return result

위에서 re.IGNORECASE 부분에서 Case를 무시하게 만드는 것 같은데요. --destine

Meta (last edited 2012-06-13 20:15:18 by 61)