Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Copied table from Excel is pasted as raw HTML

未关闭
#82 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
javascript
领域
frontend

调研方向

首先,按照提供的步骤,使用附件 example_table.xlsx 在 web UI 中的 Chrome 和 Safari 里复现粘贴 Excel 表格的操作。跟踪该问题涉及的浏览器剪贴板和粘贴处理流程。当 Chrome 生成与 Safari 相同的 Markdown 风格表格,而不是暴露原始 Excel HTML 时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

To Reproduce

Steps to reproduce the behavior:

  1. Copy table from example_table.xlsx
image
  1. Open Google Chrome and navigated to Web UI on GHES 3.8 instance (This issue is reproduced in GitHub.com as well)

  2. Paste it on a issue comment. It is pasted as raw HTML.

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 15">
<link id=Main-File rel=Main-File
href="file:////Users/hikanema/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip.htm">
<link rel=File-List
href="file:////Users/hikanema/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_filelist.xml">
<style>
<!--table
	{mso-displayed-decimal-separator:"\.";
	mso-displayed-thousand-separator:"\,";}
@page
	{margin:.75in .7in .75in .7in;
	mso-header-margin:.3in;
	mso-footer-margin:.3in;}
.font5
	{color:windowtext;
	font-size:6.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:游ゴシック;
	mso-generic-font-family:auto;
	mso-font-charset:128;}
tr
	{mso-height-source:auto;
	mso-ruby-visibility:none;}
col
	{mso-width-source:auto;
	mso-ruby-visibility:none;}
br
	{mso-data-placement:same-cell;}
td
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:12.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:游ゴシック;
	mso-generic-font-family:auto;
	mso-font-charset:128;
	mso-number-format:General;
	text-align:general;
	vertical-align:middle;
	border:none;
	mso-background-source:auto;
	mso-pattern:auto;
	mso-protection:locked visible;
	white-space:nowrap;
	mso-rotate:0;}
ruby
	{ruby-align:left;}
rt
	{color:windowtext;
	font-size:6.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:游ゴシック;
	mso-generic-font-family:auto;
	mso-font-charset:128;
	mso-char-type:katakana;
	display:none;}
-->
</style>
</head>

<body link="#0563C1" vlink="#954F72">



a | b
-- | --
1 | 2



</body>

</html>

Expected behavior
When I pasted the same excel table in Safari, it was formatted as Markdown style.

a | b
-- | --
1 | 2

Screenshots
Copy and paste table from Excel results in both raw HTML and Markdown. It depends on browser

Raw HTML in Chrome
image

Markdown in Safari
image

主要语言
JavaScript
星标
234
派生
47
平均合并
1 天 12 小时
30 天内合并 PR
5

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/paste-markdown 的其他 Issue

查看 github/paste-markdown 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。