최근 바뀜
도구
업로드
도움말
길라잡이
위키 문법
특수 문서
문의·신고
디스코드
IP 사용자
216.73.216.63
로그인
모듈:Dictionary 문서 원본 보기
←
모듈:Dictionary
편집
토론
역사
새로고침
주시
역링크
정보
문서 편집 권한이 없습니다. 다음 이유를 확인해주세요:
요청한 명령은 다음 권한을 가진 사용자에게 제한됩니다:
사용자
.
문서의 원본을 보거나 복사할 수 있습니다.
local p = {} local encode = mw.text.encode local data = mw.loadData('Module:Dictionary/data') local json = mw.text.jsonEncode(data) function p.render(frame) local out = {} out[#out+1] = '{| class="wikitable mw-dictionary"' out[#out+1] = '! 단어 !! 뜻' for term, def in pairs(data) do out[#out+1] = '|-\n| ' .. term .. ' || ' .. def end out[#out+1] = '|}' -- ① JSON을 “숨은 <div>”에 넣고 HTML-escape out[#out+1] = '<div id="dictionary-json" style="display:none">' .. encode(json) .. '</div>' return table.concat(out, '\n') end -- API 나 다른 모듈에서 JSON으로만 쓰고 싶을 때 호출 function p.export() return json(data) end return p
이 문서에 포함된 문서:
모듈:Dictionary/설명문서
(
원본 보기
)
모듈:Dictionary
문서로 돌아갑니다.