Documentation

txtfmt

pub fn fmt(md: impl AsRef<str>) -> String {
  md.as_ref()
    .trim_end()
    // 把 \r\n 和 \r 都变为 \n
    .lines()
    .map(|l| l.trim_end())
    .collect::<Vec<_>>()
    .join("\n")
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。